Re: listfiles, moving files

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17226
interpreted = N
texte = (Sandra L. Pitner) >I'm trying to move all the files in one folder to another folder after I >process them in a batch manner... >... >it moves every second file to the intended folder. I presume this is >because of some index mix-up that occurs from removing files from the >folder. Yes, exact one half of the files are moved in each run of [MoveFiles...] Dave MacLeay's copy/delete method did the same in my test. If you run it half times the number of files to move, you are through. You can use the following workaround which does no harm if you forget it in your code when the problem finally gets fixed... -------------------- [math show=f]counter=0[/math] [ListFiles store/pending/] [math show=f]counter=counter+1[/math] [/ListFiles] [Loop start=1&end=[math]counter/2[/math]] [ListFiles store/pending/] [math show=f]counter=counter+1[/math] [MoveFile path=store/pending/[FileName]&to=store/ready/[FileName]] [/ListFiles] [/Loop] -------------------- At the first run I count the files, divide the counter value by 2 and that is the number of runs you need to move all files. This is not remarkable slower than a single run because WebCat simply seems to get the wrong index - and in case the behavior normalizes some day there would be some empty runs who do not really matter.Peter__________________________________________ Peter Ostry - po@ostry.com - www.ostry.com Ostry & Partner - Ostry Internet Solutions Auhofstrasse 29 A-1130 Vienna Austria fon ++43-1-8777454 fax ++43-1-8777454-21 Associated Messages, from the most recent to the oldest:

    
  1. Re: listfiles, moving files (Kenneth Grome 1998)
  2. Re: listfiles, moving files (Peter Ostry 1998)
  3. Re: listfiles, moving files (Sandra L. Pitner 1998)
  4. Re: listfiles, moving files (Sandra L. Pitner 1998)
  5. Re: listfiles, moving files (Dave MacLeay 1998)
  6. listfiles, moving files (Sandra L. Pitner 1998)
(Sandra L. Pitner) >I'm trying to move all the files in one folder to another folder after I >process them in a batch manner... >... >it moves every second file to the intended folder. I presume this is >because of some index mix-up that occurs from removing files from the >folder. Yes, exact one half of the files are moved in each run of [MoveFiles...] Dave MacLeay's copy/delete method did the same in my test. If you run it half times the number of files to move, you are through. You can use the following workaround which does no harm if you forget it in your code when the problem finally gets fixed... -------------------- [math show=f]counter=0[/math] [ListFiles store/pending/] [math show=f]counter=counter+1[/math] [/ListFiles] [Loop start=1&end=[math]counter/2[/math]] [ListFiles store/pending/] [math show=f]counter=counter+1[/math] [MoveFile path=store/pending/[FileName]&to=store/ready/[FileName]] [/ListFiles] [/Loop] -------------------- At the first run I count the files, divide the counter value by 2 and that is the number of runs you need to move all files. This is not remarkable slower than a single run because WebCat simply seems to get the wrong index - and in case the behavior normalizes some day there would be some empty runs who do not really matter.Peter__________________________________________ Peter Ostry - po@ostry.com - www.ostry.com Ostry & Partner - Ostry Internet Solutions Auhofstrasse 29 A-1130 Vienna Austria fon ++43-1-8777454 fax ++43-1-8777454-21 Peter Ostry

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Flash (2000) system crashes, event log (1997) maybe even an easier plan to satisfy need for solid tech (2000) PDF Writefile problem (2005) listfiles-looking for slick solution (1997) Reminder for beta testers (2000) WebCatalog/Mac 2.1b2 New Features (1997) 100% cpu load (2006) WebCatalog Technical Reference (1997) Search or delete (or date or time) has bugs ... (1998) Part 2 - [showif] if variable exists (1998) Location of Browser Info.txt file (1997) Uploading Files (2000) negative less than (2000) Sku numbers (1997) Re:Copyright ? (1997) Installing on IIS 5.1 Windows XP Pro - Username/Password (2006) ErrorMessages.db suggestion (1997) shownext example (2001) Practice runs ? (1997)