dimanche 1 mai 2016

Batch File "If exist" error

So I'm unable to access my computer right now but I will try my best to ask the question to the best of my ability.

I have a batch file and my goal is to have it not be able to be used after it has already been used once. To solve this issue, I decided I would use "If Exist" to check for a file created at the end of the script. So at the very beginning I have this (I go to the correct directory)

If Exist "file.txt" (
goto exit
)

I set an "exit" marker at the end of the file. Alternate methods will be appreciated but I'd prefer the solution to this problem.

Thank you in advance.

Aucun commentaire:

Enregistrer un commentaire