+ 1
IF NOT EXIST returns ERROR in output
Hello, lately I've been working on a small project in Batch, now I have a code that tests if a folder exists, if it does everything is fine, but if the statement "IF NOT EXIST" is true, it outputs an error (just says ERROR). It appears to happen after the code when I use the ECHO command no matter where. Here's the code: REM CREATE FOLDERNAME VARIABLE SET /P FOLDERNAME=WHAT IS THE NAME OF THE FOLDER WHERE THE UNORGANIZED FILES ARE LOCATED IN? REM FIND FOLDER IF NOT EXIST "D:\Users\Eldar\Desktop\%FOLDERNAME%\" ( ECHO ERROR! FOLDER "%FOLDERNAME%" WAS NOT FOUND! ) ELSE ECHO "%FOLDERNAME%" WAS FOUND PAUSE COLOR 0C ECHO ERROR! FOLDER "%FOLDERNAME%" WAS NOT FOUND! PAUSE>NUL
4 Respostas
0
Maybe in a few hours could do some test ;-)
0
Have "a few hours" passed yet?
0
of course, I forgot it. Please write to me danifdez79@hotmail.com to remember me
0
Ok