I want to run command if the folder is exist, else i will execute another command
I tried below one
if exist "c:\program files\my File name\"
(
\\my commands...
)
else
(
\\my commands...
)
but it doesn't work
Note: folder name having spaces like "my file name"
If Exist "C:\Program Files\my folder name\" (. However your question suggests you're checking existence of a file, so remove that trailing backslash:If Exist "C:\Program Files\my file name including any extension" (