Please Please Please
can anyone explain why the following code works if I manually enter it line by line but it doesn't work if I try to execute it through a batch file?
@ECHO OFF
SETLOCAL EnableDelayedExpansion
SETLOCAL EnableExtensions
Set Source=%computername%
Set Backups=%Source%\c$\users\travel\desktop
Set Target=dan-2813-pc
Set Action=Restore
IF EXIST "\\%Backups%\%Source%-OrgUnit.txt" (
SET /p OrgUnit=<\\%Backups%\%Source%-OrgUnit.txt
SET /p MoveOU=At the end of the %Action%, do you want to move %Target% to %OrgUnit% [Y/N]?
)
ENDLOCAL
I'm at a complete loss for what I'm missing here.