Hi, how to verify if file exists on windows bat file?
Posted
by CuSS
on Stack Overflow
See other posts from Stack Overflow
or by CuSS
Published on 2010-06-11T11:03:24Z
Indexed on
2010/06/11
11:12 UTC
Read the original article
Hit count: 267
Hi, i have to create a bat file that does this:
1 - If "C:\myprogram\sync\data.handler" exists, exit;
2 - If "C:\myprogram\html\data.sql" doesn't exists, exit;
3 - In "C:\myprogram\sync\" delete all files and folders except ('test','test3' and 'test2')
4 - Copy "C:\myprogram\html\data.sql" to "C:\myprogram\sync\"
5 - Call other bat file w/ option "sync.bat myprogram.ini".
If it was in bash enviroment it was easy for me, but i don't know how to test if a file or folder exists and if it is a file or folder :/
Thanks
© Stack Overflow or respective owner