| 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
|
|
|
|