1
I wrote a small BATCH-File to sync my PC and Notebook folders for university.
REM set tdate=%date: =%
REM set tdate=%tdate:/=%
REM
REM set ttime=%time: =%
REM set ttime=%ttime:.=%
REM set ttime=%ttime: =%
@echo off
cls
set Date format = %date%
set dd = %date:~0,2%
set mm = %date:~3,2%
set yyyy = %date:~6,4%
set Time format = %time%
set hh = %time:~0,2%
set mm = %time:~3,2%
set ss = %time:~6,2%
set Timestamp=%date:~6,4%-%date:~3,2%-%date:~0,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%
REM ROBOCOPY D:\Music F:\Music /MIR > "C:\Robocopy\%Timestamp%.log" /MT:8 /R:1 /TEE
robocopy D:\Documents\Studium \\NOTEBOOK\Documents\Studium /MIR /FFT /Z /XA:H /W:5 > "C:\Robocopy\%Timestamp%.log"
Everything works fine on when running this on my PC. When doing the same script on my NOTEBOOK, just changing the Paths
robocopy C:\Users\Myuser\Documents\Studium \\PC\Documents\Studium /MIR /FFT /Z /XA:H /W:5 > "C:\Robocopy\%Timestamp%.log"
I get robocopy cannot find the path specified
. When I remove > "C:\Robocopy\%Timestamp%.log"
the script works fine. The Folder C\obocopy does exst, I run the BATCH-Script from this directory...running as administrator doesn't make a difference.
Any ideas?
Is the date/time configuration the same on both machines? – MC ND – 2015-09-12T12:19:45.637
Yes, date and time is the same and on both machines and C:\Robocopy directory exists. I run the scripts while being in the C:\Robocopy directory. – Yaerox – 2015-09-13T10:48:51.133
Is
\\PC
your real path or did you fill it in instead of say\\192.168.0.10
? Anyway, if\\PC
should point to your PC, check that this is its NetBIOS name and that\\PC\Documents\
is shared via the network. – flolilo – 2017-09-10T11:15:09.230