I have one file at c:\1\1.txt
In my batch program before performing any operation I have to check whether the file exists or not
My command is
If exist c:\1\1.txt Echo 1 Its not working. In fact, because of if command the batch is crashing.
first check by command console the name of file doing
cd c:\1 dir *.txt why?
if you create a new file txt with notepad and save it writing in name field 1.txt, the final file name is 1.txt.txt , you can verify this with command console doing
cd c:\1 dir *.txt then if exist sentence work fine because 1.txt don't exist, the true name of file is 1.txt.txt.
is a posibility for this problem.
if command.