Problem accessing files on Window2K server

I wasn’t sure where to post this. Has anyone had any experience with scripts accessing files on a Windows 2000 server volume. I ran one over a year ago and I remember problems with files not being accessible. The script simplified was something like:

tell app “Finder”
if (exists file some_file_reference) then
– open the file in Photoshop and process
end if
end tell

The script would often get inside the “if” statement but then a “File not found”, 43 error would pop up. Most frustating, simply re-running the script would solve the problem. It looks like I am going to need another script with files on a Windows 2000 volume and I would like to avoid shooting myself in the foot again.

I have had this problem with servers that are either slow to respond or if the folder the file is in has too many items in it. This goes for NT,2000,XP and unix shares. The problem is the Finder. It’s slow to list the contents, especially when all the items have icons. You can try doing a list folder and then see if the file is in the list or try a scripting addition such as jon’s commands to see if the file exists.

HTH -john

if you are doing this in osX then you can call a shell command such as


do shell script "ls -1 /path/to/filetocheck/" 

to see if the file exists also.