Web Servers on Windows - checking the existing of a file

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Windows > February 2004 > checking the existing of a file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author checking the existing of a file
C Chang

2004-02-08, 11:47 am

Does anyone know which command-line command under the NT environment can
be used for checking the existing of a file? so that I can use the IF
ERRORLEVEL GOTO .. in a batch file. I want to write a batch file to
check the existing of a certain file and do some other job. I have
look the Help under the NT and have not ffind any. I wrote a VBscript
file to do the same thing. But I want to extend my knowledge, besides
it might more easy. Thanks.

C Chang
Thor Kottelin

2004-02-08, 11:47 am



C Chang wrote:
>
> Does anyone know which command-line command under the NT environment can
> be used for checking the existing of a file? so that I can use the IF
> ERRORLEVEL GOTO .. in a batch file.


dir

Thor

--
http://thorweb.anta.net/
Jim Patterson

2004-02-08, 11:47 am

C Chang wrote:
> Does anyone know which command-line command under the NT environment can
> be used for checking the existing of a file? so that I can use the IF
> ERRORLEVEL GOTO .. in a batch file. I want to write a batch file to
> check the existing of a certain file and do some other job. I have
> look the Help under the NT and have not ffind any. I wrote a VBscript
> file to do the same thing. But I want to extend my knowledge, besides
> it might more easy. Thanks.


There's an easier way - use IF EXIST <filename>

Type IF /? in a command box to get the nitty gritty.

--
Jim Patterson
Ottawa, CANADA
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com