Windows 7 batch files: How to check if parameter has been passed to batch file
if %1.==. dir will break if the parameter includes various symbols like “, <, etc if “%1″==”” will break if the parameter includes a quote (“). Use if “%~1″==”” instead: if “%~1″==”” ( echo No parameters have been provided. ) else ( echo Parameters: %* ) This should work on all versions of Windows and … Read more