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:

Protect (1997) New servers and new inline cache (1997) Nesting format tags (1997) WebCat2_Mac RETURNs in .db (1997) [BoldWords WordList]Any Text[/BoldWords] (2000) Plugin or CGI or both (1997) WebCatalog not running after upgrade (2000) Apache 2.x (2003) Emailer setup (1997) redirect with frames (1997) WebCatalog 2.0 & WebDNA docs in HTML ... (1997) how to post without certain data appearing in the html source (2001) Date search - yes or no (1997) Search in 2 or more catalogs (1997) Username for Admin Group (1997) Code shows all, but should not (2003) more info on [setlineitems] (1997) Where's Cart Created ? (1997) Credit card processing - UK (1997) Server IP Address (2003)