movefile occasionally not working (long, code included)

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37590
interpreted = N
texte = Hello,WebStar 4.4, WebCatalog 3.0.7I have a piece of code that does the following:* lists all files in a particualr directory * stores various file information about each file into a temp db * decides how many records to act upon based on how many records there are * grabs the filename, minus the file extension and uses that info to look up a record in another database * then moves the file to a particular folder based on criteria stored in the second database for that particular record. * sends an email to the owner of that record letting them know the record has been updated. This has worked fine so it seems for some time. However, on 3 occasions I have found that the file does not get deleted. It ends up getting copied and not deleted. The file is NOT locked.What ends up happening is that the owner of that record keeps getting emails every hour (this process is called by a trigger) until I manually delete the file.Any ideas about why [movefile] occasionally will not work?--- code --- [search db=/members.db&eqRecord_idData=[image_id]]number found = [numfound]
[founditems] [record_id] - [nickname], [hasthumb], [pic_filename] - [image_id], [imagename]

[showif [pic_filename]>] old file path= [text show=t]oldfile=[pic_filename][/text]
[DELETEFILE file=/pics/[pic_filename]] [/showif] [showif [fileinfo /pics/[country]/][exists][/fileinfo]=F] [country]xx
[createfolder /pics/[country]] [/showif] [showif [country]=USA] [country]zz
[showif [state]!] [state] [showif [fileinfo /pics/[country]/[state]][exists][/fileinfo]=F] [createfolder /pics/[country]/[state]] [/showif] [/showif] [/showif][showif [country]=USA] imagepath = [imagepath]
imagename= [imagename]
country = [country]
state = [state]
[movefile from=PostNewPics/[imagename]&to=/pics/[country]/[state]/[imagename]][Replace db=/members.db&eqRecord_IDdata=[record_id]]pic_filename=[country]/[state]/[imagename]&date_updated=[date]&pic_height=&pic_width=&TimeUpdateSrt=[math]{[TIME]}[/math]&dateUpdateSrt=[math]{[date]}[/math]&LastPicUpdate=[math]{[date]}[/math][/Replace] [SendMail to=[email]&from=members@bear.net&subject=A picture for [first_name] has been added]This is an automatic email. Please do not reply to this message as it will not be read.email content[/SendMail] [/showif][showif [country]!USA] imagepath = [imagepath]
imagename= [imagename]
country = [country]
[movefile from=PostNewPics/[imagename]&to=/pics/[country]/[imagename]] [Replace db=/members.db&eqRecord_IDdata=[image_id]]pic_filename=[country]/[imagename]&date_updated=[date]&dateUpdateSrt=[math]{[date]}[/math]&pic_height=&pic_width=&TimeUpdateSrt=[math]{[TIME]}[/math]&LastPicUpdate=[math]{[date]}[/math][/Replace] [SendMail to=[email]&from=members@bear.net&subject=A picture for [first_name] has been added]This is an automatic email. Please do not reply to this message as it will not be read.email content [/SendMail] [/showif][/founditems] [/search] --- end code ---------------------------------------------------------------- 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. movefile occasionally not working (long, code included) (Dale Therio 2001)
Hello,WebStar 4.4, WebCatalog 3.0.7I have a piece of code that does the following:* lists all files in a particualr directory * stores various file information about each file into a temp db * decides how many records to act upon based on how many records there are * grabs the filename, minus the file extension and uses that info to look up a record in another database * then moves the file to a particular folder based on criteria stored in the second database for that particular record. * sends an email to the owner of that record letting them know the record has been updated. This has worked fine so it seems for some time. However, on 3 occasions I have found that the file does not get deleted. It ends up getting copied and not deleted. The file is NOT locked.What ends up happening is that the owner of that record keeps getting emails every hour (this process is called by a trigger) until I manually delete the file.Any ideas about why [movefile] occasionally will not work?--- code --- [search db=/members.db&eqRecord_idData=[image_id]]number found = [numfound]
[founditems] [record_id] - [nickname], [hasthumb], [pic_filename] - [image_id], [imagename]

[showif [pic_filename]>] old file path= [text show=t]oldfile=[pic_filename][/text]
[DELETEFILE file=/pics/[pic_filename]] [/showif] [showif [fileinfo /pics/[country]/][exists][/fileinfo]=F] [country]xx
[createfolder /pics/[country]] [/showif] [showif [country]=USA] [country]zz
[showif [state]!] [state] [showif [fileinfo /pics/[country]/[state]][exists][/fileinfo]=F] [createfolder /pics/[country]/[state]] [/showif] [/showif] [/showif][showif [country]=USA] imagepath = [imagepath]
imagename= [imagename]
country = [country]
state = [state]
[movefile from=PostNewPics/[imagename]&to=/pics/[country]/[state]/[imagename]][Replace db=/members.db&eqRecord_IDdata=[record_id]]pic_filename=[country]/[state]/[imagename]&date_updated=[date]&pic_height=&pic_width=&TimeUpdateSrt=[math]{[time]}[/math]&dateUpdateSrt=[math]{[date]}[/math]&LastPicUpdate=[math]{[date]}[/math][/Replace] [SendMail to=[email]&from=members@bear.net&subject=A picture for [first_name] has been added]This is an automatic email. Please do not reply to this message as it will not be read.email content[/SendMail] [/showif][showif [country]!USA] imagepath = [imagepath]
imagename= [imagename]
country = [country]
[movefile from=PostNewPics/[imagename]&to=/pics/[country]/[imagename]] [Replace db=/members.db&eqRecord_IDdata=[image_id]]pic_filename=[country]/[imagename]&date_updated=[date]&dateUpdateSrt=[math]{[date]}[/math]&pic_height=&pic_width=&TimeUpdateSrt=[math]{[time]}[/math]&LastPicUpdate=[math]{[date]}[/math][/Replace] [SendMail to=[email]&from=members@bear.net&subject=A picture for [first_name] has been added]This is an automatic email. Please do not reply to this message as it will not be read.email content [/SendMail] [/showif][/founditems] [/search] --- end code ---------------------------------------------------------------- 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/ Dale Therio

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:

WebCatalog as a ListServ (1998) Notepad problems (1998) More Discount Pricing thoughts/efforts (1998) Kudos (1998) Date subtraction (2002) Document Contains No Data! (1997) WebCat2 Append problem (B14Macacgi) (1997) WebCat and WebTen 2.0 (1997) Search Command, multiple dbs, etc. --still confused (2000) TeaRoom Order fields email account remain empty even though thewy are filled. (1997) How does WebCatalog search the database? (1997) Webten 4.0 Plugin Question (2000) OT: Sending email to lots of subscribers (1999) Database changes (1998) More on the email templates (1997) Emailer [cart] file names (1997) item sorting (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) is sku a REQUIRED field on NT (1997) WebTen? (1997)