Help- XCOPY

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
aseventhmindset
Posts: 8
Joined: 11 Apr 2010 20:55

Help- XCOPY

#1 Post by aseventhmindset » 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

aseventhmindset
Posts: 8
Joined: 11 Apr 2010 20:55

Re: Help- XCOPY

#2 Post by aseventhmindset » 11 Apr 2010 21:07

Nevermind i forgot the 2nd =

Post Reply