Re: listfiles, moving files

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17224
interpreted = N
texte = I tried the below suggestion and the deletefiles routine only deletes every other file still.So, I looked at the documentation (always a treat!) and decided to [deletefolder] and [createfolder] after the copyfile.ThanksSandy>Looks like WebCat is relying on indexes for [listfiles] operations, like it >does with [FoundItems] (search the archive for Re: Date or time >comparisons have bugs ... for more info). > >Try this instead: > > >[listfiles /store/pending] >[copyfile path=/one folder/[filename]&to=/anther folder/[filename]] >[/listfiles] > >[listfiles /store/pending] >[deletefile /one folder/[filename]] >[/listfiles] > > >Having to do two [listfiles] may be kind of slow, but it does mean that all >of your files will be copied (moved) before any of them are deleted, so >WebCat shouldn't get confused... > >-Dave > > > >At 2:37 PM 4/23/98, Sandra L. Pitner wrote: >>I'm trying to move all the files in one folder to another folder after I >>process them in a batch manner. When I do the below code: >> >> >>[listfiles /store/pending] >>[movefile path=/one folder/[filename]&to=/anther >>folder/[filename]][filename] >>[/listfiles] >> >> >>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. >> >>Do I have to write a temporary databse of all the files in the folder >>then do the [movefile] within [founditems] context? Any better ideas? >> >> >>Thanks >> >> >>Sandy > > >o--------------- Dave MacLeay --+ >o----------- Digital Frontier --+ >o--- dave@digitalfrontier.com --+ > > > 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)
I tried the below suggestion and the deletefiles routine only deletes every other file still.So, I looked at the documentation (always a treat!) and decided to [deletefolder] and [createfolder] after the copyfile.ThanksSandy>Looks like WebCat is relying on indexes for [listfiles] operations, like it >does with [founditems] (search the archive for Re: Date or time >comparisons have bugs ... for more info). > >Try this instead: > > >[listfiles /store/pending] >[copyfile path=/one folder/[filename]&to=/anther folder/[filename]] >[/listfiles] > >[listfiles /store/pending] >[deletefile /one folder/[filename]] >[/listfiles] > > >Having to do two [listfiles] may be kind of slow, but it does mean that all >of your files will be copied (moved) before any of them are deleted, so >WebCat shouldn't get confused... > >-Dave > > > >At 2:37 PM 4/23/98, Sandra L. Pitner wrote: >>I'm trying to move all the files in one folder to another folder after I >>process them in a batch manner. When I do the below code: >> >> >>[listfiles /store/pending] >>[movefile path=/one folder/[filename]&to=/anther >>folder/[filename]][filename] >>[/listfiles] >> >> >>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. >> >>Do I have to write a temporary databse of all the files in the folder >>then do the [movefile] within [founditems] context? Any better ideas? >> >> >>Thanks >> >> >>Sandy > > >o--------------- Dave MacLeay --+ >o----------- Digital Frontier --+ >o--- dave@digitalfrontier.com --+ > > > Sandra L. Pitner

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:

New Mac Emailer... (1997) 2.0 Info (1997) Paypal merchant code tricks or pitfalls (2003) Quickie question on the email templates (1997) Multiple prices (1997) Date Formats (1997) Interfacing WC with mail server (1998) Pull down menu for categories (2000) Emailer (1997) pc (1997) Searching Numbers (2004) Newbie from and old bee (1997) Generating Report Totals (1997) [OT] JS Help PLEASE (2006) Discounts (1998) Card clearance, problems - solutions? (1997) A Global Variable (1997) WebCat2 Append problem (B14Macacgi) (1997) webmerchant/mac auth. rejects zipcode (1998) WebCatalog NT beta 18 problem (1997)