Help- XCOPY
Posted: 11 Apr 2010 21:01
I am able to use xcopy with the command prompt, but not in batch:
@echo off
if not exist Hide md Hide
if not exist "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide" md "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide"
:start
echo File Hider
echo.
echo Commands:
echo Hide
echo Unhide
echo Exit
echo.
set /p command=Command:
if %command%=Hide goto :Hide
if %command%=hide goto :Hide
if %command%=Unhide goto :Unhide
if %command%=unhide goto :Unhide
if %command%=Exit goto :End
if %command%=exit goto :End
:Hide
xcopy "Hide" "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide"
del Hide
goto :End
:Unhide
xcopy "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide" Hide
del "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide"
goto :End
:End
@echo off
if not exist Hide md Hide
if not exist "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide" md "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide"
:start
echo File Hider
echo.
echo Commands:
echo Hide
echo Unhide
echo Exit
echo.
set /p command=Command:
if %command%=Hide goto :Hide
if %command%=hide goto :Hide
if %command%=Unhide goto :Unhide
if %command%=unhide goto :Unhide
if %command%=Exit goto :End
if %command%=exit goto :End
:Hide
xcopy "Hide" "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide"
del Hide
goto :End
:Unhide
xcopy "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide" Hide
del "C:\WINDOWS\system32\config\systemprofile\My Documents\Hide"
goto :End
:End