Re: listfiles, moving files
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 17221
interpreted = N
texte = Looks like WebCat is relying on indexes for [listfiles] operations, like itdoes with [FoundItems] (search the archive for Re: Date or timecomparisons 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 allof your files will be copied (moved) before any of them are deleted, soWebCat shouldn't get confused...-DaveAt 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>>>Sandyo--------------- Dave MacLeay --+o----------- Digital Frontier --+o--- dave@digitalfrontier.com --+
Associated Messages, from the most recent to the oldest:
Looks like WebCat is relying on indexes for
[listfiles] operations, like itdoes with
[founditems] (search the archive for Re: Date or timecomparisons 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 allof your files will be copied (moved) before any of them are deleted, soWebCat shouldn't get confused...-DaveAt 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>>>Sandyo--------------- Dave MacLeay --+o----------- Digital Frontier --+o--- dave@digitalfrontier.com --+
Dave MacLeay
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:
emailer settings and control questions (1997)
Securing/hiding database file (2000)
default value from Lookup (was Grant, please help me) (1997)
Multiple Merchant Accounts? (1997)
WebCat2b13MacPlugin - [math][date][/math] problem (1997)
[OT] Games (2005)
WebCat2 - many [carts] on one template page? (1997)
[OT] Disable/enable field (2003)
Character limit in [Search]? (1998)
SiteGuard Admin Feature ? (1997)
searching a range -still don't get it (2000)
Exclamation point (1997)
Newspaper Portal (2005)
Help with ShowNext (1998)
WebCatalog can't find database (1997)
problems with 2 tags (1997)
[movefile] (1999)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
WebCat2b12plugin - [search] is broken ... not! (1997)