checking file exists or not RRS feed

  • Question

  • hi

    i simply want to check weather a file exist or not through batch script and if it exist then jump to called label my script is like that , when i run it , it shows me both echos like its exist and then its doesnt exist where i am wrong


    IF NOT EXIST test.txt GOTO not found
    ECHO. The file exist!
    :not found
    ECHO. The file doesn't exist!

    if the post helpful please mark it right else feel free to correct me
    Wednesday, August 10, 2011 5:29 PM