Re: Syntax about DOS batch script
From: G (G@G.com)Date: 04/17/02
- Next message: The Goering's: "Re: Utility for mapping user against computer"
- Previous message: marc: "Re: Permissions change on C:\"
- In reply to: tony: "Syntax about DOS batch script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "G" <G@G.com> Date: Wed, 17 Apr 2002 11:37:01 GMT
Tony - DOS doesn't support the IF THEN ELSE like visual basic. If you want
that functionality, look at Windows Scripting Host at
http://msdn.microsoft.com/scripting
The same functionality exists with this logic however:
rem see if a file exists
if exist c:\boot.ini goto exists
goto doesntexist
:exists
echo file exists
goto done
:doesntexist
echo file doesn't exist
goto done
:done
Hope this helps!
Geoff
"tony" <tony@extranc.com> wrote in message
news:ubopeub3o2aq97@corp.supernews.com...
> Hi:
>
> i'm working on a script and i need to know
> if the certain folder exists in my win2000 file
> system or not to take the action. Is there
> way and syntax to tell the file/folder exist?
>
> ex:
> if (file/folder) then
> xxxxx
> else
> xxxxx
> end;
>
> Truly appreciated for the time and effort!
>
> tony
>
>
>
>
- Next message: The Goering's: "Re: Utility for mapping user against computer"
- Previous message: marc: "Re: Permissions change on C:\"
- In reply to: tony: "Syntax about DOS batch script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|