Steve,


Just write your file with the overwrite setting to error.



Then catch the error (place erroring handling code and @CLEARERRORS) in the 
error pane of the file write action.



This will push the file name duplication check to the OS where it'll be as fast 
as possible.



The other ideas are good ones: whenever possible subdivide folders into a 
hierarchy to keep their contents smaller. And track the folder contents in a 
database – this second one has the added cost of essentially maintaining a 
cache.



Robert







From: Fogelson, Steve [mailto:foge...@askics.net]
Sent: Saturday, April 11, 2020 11:48 AM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: Finding a file



Hope you are all staying safe.





I have a folder that has a 100,000 plus images in it. Before I use the “Write” 
action, I would like to check to see it the file already exists.



I could use the “List Directory” action and then parse, but as I mentioned 
there are a lot of files and it would be cumbersome and slow.



I tried the “Read File” action and I get server errors if it can’t find it. I 
may be doing something wrong though.



I would prefer not to use the “Command Line” action because of its inherent 
challenges.



Any ides or suggestions how I am using “Read File” incorrectly.



Steve

Internet Commerce Solutions



  _____

To unsubscribe from this list, please send an email to lists...@terascript.com 
<mailto:lists...@terascript.com>  with "unsubscribe terascript-talk" in the 
body.




----------------------------------------
 To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.

Reply via email to