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:

[SearchString] (1998) your mail (2000) Changing user submitted data (2000) Explorer 3.0/ Access Denied! (1997) Show shoppingcart after remove last item (1997) [WebDNA] sort parameters in search (2015) Giving out error pages (1997) WebCat2 - Getting to the browser's username/password data (1997) writefile - continued (1997) [SQL] context OT question (2002) WebCat with WebTen (1998) What am I missing (1997) Country & Ship-to address & other fields ? (1997) Closest non matching search (2004) WebCat2_Mac RETURNs in .db (1997) [WebDNA] IIS 7 test site on webserver IIS issue (2012) AAgghh!! Help, please. SSL strikes again. (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Was 5.0 Pricing, now Sandbox versus Website and ruminating (2003) OT: Amazon Patents (2000)