iffileexists error when file exists - need loop? or timer

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

iffileexists error when file exists - need loop? or timer

Post by kpassaur » Thu Nov 17, 2005 10:45 pm

I am having difficulty with iffileexists when the file exists on a server and the connection speed is slow to the server (I think this is the issue) is there a way to have Macro Scheduler check again or try more times before timing out? The script below (on some networks) will say the file does not exist when it does, give the error the file does not exist and then process the file that does exist.

So, on a slow network, the user gets the error message and then it works. Is there a command switch for time out before continuing processing iffileexists like there is for waiting for a window to open or a program to run?

Does anyone know if I put a command in to check again would help or woud the same thing happen?

SRT>Subsection1t
Let>S1Path=%Path%
ConCat>%S1Path%,%S1%.tif
IfFileExists>%S1Path%,s1exist,s1notexist
SRT>s1exist
Let>sec1tif=%S1Path%
END>s1exist
SRT>s1notexist
MDL>The file section Selected %S1% does not exist
Let>sec1tif=
END>s1notexist
End>Subsection1t
SRT>Subsection1f
Let>sec1tif=
End>Subsection1f

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts