So.. here's what im trying to do: Say I have a batch.cmd. When ran, it should check its location. If its in a specific folder (i.e. "%USERPROFILE%\Desktop"), it should copy itself to %USERPROFILE%, run the script from there, and exit. If it's not in "bad" folder, it should run. i've tried the following, but i must be doing something wrong.. Code: if "%~dp0" == "%USERPROFILE%\Desktop" ( copy /y "%~f0" %USERPROFILE% 2> NUL start "" "%USERPROFILE%\%~nx0" ) p.s. the script is something i wrote up quick for a guy that does laptop rentals. small batch file that clears desktop/doc/music/vid/etc (most of the homedir folders). i obviously dont want the script ran from any of those folders (it gets deleted - tested that), so i wanted some sort of check that will confirm its not being ran from one of the "bad" folders. http://pastebin.com/1p7vb309 EDIT: Changed method, works now. Code: if "%~dp0" == "%USERPROFILE%\Desktop\" goto :BadLocation if "%~dp0" == "%USERPROFILE%\Documents\" goto :BadLocation :BadLocation echo Bad location copy /y "%~f0" "%USERPROFILE%" 2> NUL start "" "%USERPROFILE%\%~nx0"