echo %something% >> name.bat becomes blank space
Posted: 11 Apr 2010 21:36
I am trying to make a batch file that will make another batch file. It works up until the point where I enter:
echo if %command%==Hide goto :Hide >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==hide goto :Hide >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==Unhide goto :Unhide >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==unhide goto :Unhide >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==Exit goto :End >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==exit goto :End >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
The batch file "File Hider.cmd" has a blank space where it should say "%command%". I know why this happens, but I was wondering if there is a way to work around this.
echo if %command%==Hide goto :Hide >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==hide goto :Hide >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==Unhide goto :Unhide >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==unhide goto :Unhide >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==Exit goto :End >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
echo if %command%==exit goto :End >> "%homedrive%\Documents and Settings\%username%\desktop\File Hider\FileHider.cmd"
The batch file "File Hider.cmd" has a blank space where it should say "%command%". I know why this happens, but I was wondering if there is a way to work around this.