I'm trying to take a .txt file and move it over the network with xcopy
.
Here is my code thus far:
@ECHO off
XCOPY /y pushd \\Oafrpnbtcsi01\Test_Systemplatz\Systemplatz_SLOT_1_Fail.txt
rem get date, make if file name friendly
FOR /F "tokens=1-4 delims=/ " %%i in ('date/t') do set d=%%i-%%j-%%k-%%l
set MBD=Systemplatz_SLOT_1_FailB%d%DN.txt
ren Systemplatz_SLOT_1_Fail.txt %MBD%
move *.txt F:\Public\Logfiles\Systemplatz\Test\02\Systemplatz Slot 1
@ECHO on
I also want the date to be added into the text file's name.
So far it's not working, so I'm positive I have done something wrong. If there is a better way to do this, please do explain.