Corrupted filetypes with [movefile]

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18333
interpreted = N
texte = WebCat PI 2.1-2.1.6, MacOS 8, WebStar 3When people are preparing their order, I give them an option to view and print a plain text form which they can fax/mail in to us. When they view the form, their cart file is moved from the Shoppingcarts folder to the Fax folder (where carts are recycled after 10 days instead of 1 day). This is done by putting a [MOVEFILE path=/ShoppingCarts/[CART]&to=/Fax/[Cart]] at the top of the Fax.html page. It's pretty simple.Sometimes the cart gets corrupted when it gets moved. The content is fine, but the creator and file types are changed to nonsense, the file is given a random label, and the mod date is changed to 1/1/04. This has been happening very frequently recently (4 out of 5 times as opposed to the 1 out of 20 times it used to happen), so I dug in my heels and did some testing.I set up two folders (test1 and test2) and put a cart (666666) in test1. I then used the followign code to move it to test 2: [MOVEFILE path=/test1/666666&to=/test2/666666]. It worked fine.Then, I accidentally hit the same code *again*. That's when the corruption occurred.I replced the [MOVEFILE] with a [COPYFILE]/[DELETEFILE] combo. After hitting the code twice, I got almost the same results, except the file date was correct.Also, [MOVEFILE path=/test/file.txt&to=/test/file.txt] and [MOVEFILE path=/test/file.txt&to=/test2/file.txt] where test2 doesn't exist will completely delete file.txt. To both of these cases I say Ick. I can see that completely screwing up someone's work if they're not careful. It *should* do nothing with the file.txt.MichaelMichael Winston *By e-mail!: michaelw@dhorse.com Internet Coordinator *By web!: http://www.dhorse.com/ Dark Horse Comics, Inc. *By fax!: 503/654/9440 Associated Messages, from the most recent to the oldest:

    
  1. Corrupted filetypes with [movefile] (Michael Winston 1998)
WebCat PI 2.1-2.1.6, MacOS 8, WebStar 3When people are preparing their order, I give them an option to view and print a plain text form which they can fax/mail in to us. When they view the form, their cart file is moved from the Shoppingcarts folder to the Fax folder (where carts are recycled after 10 days instead of 1 day). This is done by putting a [MOVEFILE path=/ShoppingCarts/[cart]&to=/Fax/[cart]] at the top of the Fax.html page. It's pretty simple.Sometimes the cart gets corrupted when it gets moved. The content is fine, but the creator and file types are changed to nonsense, the file is given a random label, and the mod date is changed to 1/1/04. This has been happening very frequently recently (4 out of 5 times as opposed to the 1 out of 20 times it used to happen), so I dug in my heels and did some testing.I set up two folders (test1 and test2) and put a cart (666666) in test1. I then used the followign code to move it to test 2: [MOVEFILE path=/test1/666666&to=/test2/666666]. It worked fine.Then, I accidentally hit the same code *again*. That's when the corruption occurred.I replced the [movefile] with a [copyfile]/[deletefile] combo. After hitting the code twice, I got almost the same results, except the file date was correct.Also, [MOVEFILE path=/test/file.txt&to=/test/file.txt] and [MOVEFILE path=/test/file.txt&to=/test2/file.txt] where test2 doesn't exist will completely delete file.txt. To both of these cases I say Ick. I can see that completely screwing up someone's work if they're not careful. It *should* do nothing with the file.txt.MichaelMichael Winston *By e-mail!: michaelw@dhorse.com Internet Coordinator *By web!: http://www.dhorse.com/ Dark Horse Comics, Inc. *By fax!: 503/654/9440 Michael Winston

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:

OH MY GOD! (1998) Web Catalog 2 demo (1997) [OT] (waaaay OT) further off topic than before (2004) WC2b12: Yes, Formulas.db is for real (1997) RE: [WebDNA] directory protection questions (2008) Banners (1997) auto enter dates (1998) Using WebCat for product info requests (1997) Sub Totals (2000) Error 11 (1996) One more time (1997) Re:2nd WebCatalog2 Feature Request (1996) lookup (1998) TXT (2003) [WebDNA] Where is Speed Test? (2009) Bug? (1997) Cart # Starting at 1000 (2000) Case statement (2003) help testing quicktime delivery (1997) showif comparison begins w/ and contains (1997)