Computing.Net > Forums > Programming > Loopinig batch file using IF EXIST

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Loopinig batch file using IF EXIST

Reply to Message Icon

Name: Phuztone
Date: December 2, 2008 at 12:53:27 Pacific
OS: Windows XP
CPU/Ram: P4 / 4GB
Product: Home grown
Comment:

I would like to have a batch file that looks for a file on a network drive, if it doesn't find it, it waits for 10 seconds or so, & looks for it again. I've seen batch files like this that use IF EXIST for the file check & CHOICE to wait a few seconds before looping back to the IF EXIST again. But none did what I wanted particularly.

Thanks!!



Sponsored Link
Ads by Google

Response Number 1
Name: BatchFreak
Date: December 2, 2008 at 15:42:12 Pacific
Reply:

:start
PING 127.0.0.1 -n 1 -w 10000 >NUL
IF EXIST file (
ECHO It exists!
Pause
EXIT
) else ( GOTO start )

I only Batch if possible, 2000 more lines of code, oh well.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Loopinig batch file using IF EXIST

batch file help www.computing.net/answers/programming/batch-file-help/11688.html

IF Exists with wildcards? www.computing.net/answers/programming/if-exists-with-wildcards/15334.html

path problem in batch file... www.computing.net/answers/programming/path-problem-in-batch-file/9916.html