K
Karl Burrows
Hi!
I am trying to write a script (newbie!!) to copy a text file from a remote
computer to our home office server through a VPN connection. Instead of
mapping the drive on the remote computer (to avoid accidental
disconnection), I setup a Network Place for the VPN folder.
All remote computers run Win2000 and server is Win2000 Server.
Here is what I have so far, but can't get the script to execute. Any
suggestions would be greatly appreciated!
@ECHO OFF
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ECHO * This will copy the MWS Payroll Data to the Home Office *
ECHO * Make sure you have saved your current Payroll data *
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ECHO.
ECHO Press CTRL-C to abort
ECHO or
PAUSE
XCOPY C:\Documents and Settings\Remote User\Desktop\Test.txt \\Server\Copy
Folder /f /v /z
if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort
if errorlevel 0 goto exit
:lowmemory
echo Insufficient memory to copy files or
echo invalid drive or command-line syntax.
goto exit
:abort
echo You pressed CTRL+C to end the copy operation.
goto exit
:exit
I am trying to write a script (newbie!!) to copy a text file from a remote
computer to our home office server through a VPN connection. Instead of
mapping the drive on the remote computer (to avoid accidental
disconnection), I setup a Network Place for the VPN folder.
All remote computers run Win2000 and server is Win2000 Server.
Here is what I have so far, but can't get the script to execute. Any
suggestions would be greatly appreciated!
@ECHO OFF
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ECHO * This will copy the MWS Payroll Data to the Home Office *
ECHO * Make sure you have saved your current Payroll data *
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ECHO.
ECHO Press CTRL-C to abort
ECHO or
PAUSE
XCOPY C:\Documents and Settings\Remote User\Desktop\Test.txt \\Server\Copy
Folder /f /v /z
if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort
if errorlevel 0 goto exit
:lowmemory
echo Insufficient memory to copy files or
echo invalid drive or command-line syntax.
goto exit
:abort
echo You pressed CTRL+C to end the copy operation.
goto exit
:exit