Prüfen ob Datei existiert

ID184
Link ReferenceNot set
Link CreditsNot set
Link Technical DocumentationNot set
PlCodelangBatch
PlGroupFilehandling
PlItemTitlePrüfen ob Datei existiert
Code@echo off

SET checkFileExists="C:\Temp\myFile.txt"
IF exist %checkFileExists% GOTO :EXISTS
GOTO :EXISTSNOT

:EXISTS
echo There it is :-)
GOTO :END

:EXISTSNOT
echo Sorry, the file isn't there :-(
GOTO :END

:END
echo End of program
Result Example