Moving orderfiles into sub folders

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37704
interpreted = N
texte = Hi, We're putting together a invoice page which at the end, moves the order file into a folder based on the first three numbers of the Cart ID. The creating of the folders, and the moving of the files is fine, but it won't delete the original orderfile! We initially tried using [movefile] rather than [copyfile] but that just left a copy behind when it moved the file.Any ideas? [purchase cart=[cart]][!] Create the variable for the folder name, based on the first three numbers of the cart ID [/!] [text show=F]foldername=[GetChars start=1&end=3][cart][/GetChars][/text][!] Check if the folder already exists, if it doesn't, create it [/!] [showif [FileInfo file=/Orders/[foldername]][exists][/FileInfo]=F][CREATEFOLDER /Orders/[foldername]][/showif][!] Check if the file already exists in that folder, if it does, copy it into the duplicate folder and rename it[/!] [showif [FileInfo file=/Orders/[foldername]/[cart]][exists][/FileInfo]=T] [copyfile from=/Orders/[cart]&to=/Orders/duplicates/[cart]-[random][random][random][ra ndom][random]] [/showif][!] Check if the file already exists in that folder, if it doesn't, copy it into the folder[/!] [showif [FileInfo file=/Orders/[foldername]/[cart]][exists][/FileInfo]=F], [copyfile from=/Orders/[cart]&to=/Orders/[foldername]/[cart]] [/showif][DELETEFILE file=ShoppingCarts/[cart]][WaitForFile file=Orders/[cart]] [DELETEFILE file=Orders/[cart]] [/WaitForFile] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Moving orderfiles into sub folders (WebMaster 2001)
Hi, We're putting together a invoice page which at the end, moves the order file into a folder based on the first three numbers of the Cart ID. The creating of the folders, and the moving of the files is fine, but it won't delete the original orderfile! We initially tried using [movefile] rather than [copyfile] but that just left a copy behind when it moved the file.Any ideas? [purchase cart=[cart]][!] Create the variable for the folder name, based on the first three numbers of the cart ID [/!] [text show=F]foldername=[GetChars start=1&end=3][cart][/GetChars][/text][!] Check if the folder already exists, if it doesn't, create it [/!] [showif [FileInfo file=/Orders/[foldername]][exists][/FileInfo]=F][CREATEFOLDER /Orders/[foldername]][/showif][!] Check if the file already exists in that folder, if it does, copy it into the duplicate folder and rename it[/!] [showif [FileInfo file=/Orders/[foldername]/[cart]][exists][/FileInfo]=T] [copyfile from=/Orders/[cart]&to=/Orders/duplicates/[cart]-[random][random][random][ra ndom][random]] [/showif][!] Check if the file already exists in that folder, if it doesn't, copy it into the folder[/!] [showif [FileInfo file=/Orders/[foldername]/[cart]][exists][/FileInfo]=F], [copyfile from=/Orders/[cart]&to=/Orders/[foldername]/[cart]] [/showif][DELETEFILE file=ShoppingCarts/[cart]][WaitForFile file=Orders/[cart]] [DELETEFILE file=Orders/[cart]] [/WaitForFile] ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ WebMaster

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:

Web-based email solution (2003) Support ?? (1997) [WebDNA] Problem with administration (2009) Sorting by date (1997) Apoligy (1997) Search bug. Help (2002) OT : Virus (2000) [removehtml] (was: Undocumented tags and contexts) (2000) OT: Quick poll (2003) [WebDNA] WebDNA is not parsing CSS file (2010) WebCatalog for guestbook ? (1997) [OT] Form POSTing with LONG variable (2007) Training Tapes Improved (1998) WC Database Format (1997) Sort Order on a page search (1997) RE: E-mailer error codes (1997) Hiding Brands (2004) using showpage and showcart commands (1996) Multiple Replaces? (1997) URL for Discussion Archive (1997)