Hi All:
I have a script that is using robocopy and here it is:
rem remove the shares initiallynet use \\192.168.49.160\Archive2 /deletenet use \\192.168.49.132\GNSSData /delete
net use \\192.168.49.160\Archive2 /user:ntripweb ThePasswordnet use \\192.168.49.132\GNSSData /user:ntripweb ThePassword
robocopy \\192.168.49.160\Archive2\AlloyDirect\RefData.24 \\192.168.49.132\GNSSData\AlloyDirect\RefData.24 /S /Z /mt:16 /xf /min:2000000 /MAXAGE:120 /LOG+:Alloycopylog\Alloycopy-%date:~-4,4%"-"%date:~-7,2%"-"%date:~-10,2%.log /NP /r:3 /W:5
rem remove the sharesnet use \\192.168.49.160\Archive2 /deletenet use \\192.168.49.132\GNSSData /delete
This is in a bat file that is called every hour and is run under the account "NAS1\ntripweb".
If I leave it to run by task scheduler, when the date ticks over(the files are organized by date) it fails with the following:
New File 2.8 m \\192.168.49.160\Archive2\AlloyDirect\RefData.24\Month.Dec\Day.11\GUWA_Guwah202412111500A.T022024/12/13 12:08:03 ERROR 2 (0x00000002) Copying File \\192.168.49.160\Archive2\AlloyDirect\RefData.24\Month.Dec\Day.11\GUWA_Guwah202412111500A.T02The system cannot find the file specified.ERROR: RETRY LIMIT EXCEEDED.
For some reason, the script cannot create the new directory Day.11. The directory that the destination is in is owned by "ntripweb", the directory also has full permissions control to "ntripweb" to the local and files and folders beneath it.
This happens hour after hour.
Now here is the confusing part......
If I bring up "Task Scheduler" as the administrator and right click on that task and select run......it works.
But if I leave it for task scheduler to run it fails until that subdirectory Day.11 is created.
This is very weird.
Any ideas?
Cheers,
John
I have a script that is using robocopy and here it is:
rem remove the shares initiallynet use \\192.168.49.160\Archive2 /deletenet use \\192.168.49.132\GNSSData /delete
net use \\192.168.49.160\Archive2 /user:ntripweb ThePasswordnet use \\192.168.49.132\GNSSData /user:ntripweb ThePassword
robocopy \\192.168.49.160\Archive2\AlloyDirect\RefData.24 \\192.168.49.132\GNSSData\AlloyDirect\RefData.24 /S /Z /mt:16 /xf /min:2000000 /MAXAGE:120 /LOG+:Alloycopylog\Alloycopy-%date:~-4,4%"-"%date:~-7,2%"-"%date:~-10,2%.log /NP /r:3 /W:5
rem remove the sharesnet use \\192.168.49.160\Archive2 /deletenet use \\192.168.49.132\GNSSData /delete
This is in a bat file that is called every hour and is run under the account "NAS1\ntripweb".
If I leave it to run by task scheduler, when the date ticks over(the files are organized by date) it fails with the following:
New File 2.8 m \\192.168.49.160\Archive2\AlloyDirect\RefData.24\Month.Dec\Day.11\GUWA_Guwah202412111500A.T022024/12/13 12:08:03 ERROR 2 (0x00000002) Copying File \\192.168.49.160\Archive2\AlloyDirect\RefData.24\Month.Dec\Day.11\GUWA_Guwah202412111500A.T02The system cannot find the file specified.ERROR: RETRY LIMIT EXCEEDED.
For some reason, the script cannot create the new directory Day.11. The directory that the destination is in is owned by "ntripweb", the directory also has full permissions control to "ntripweb" to the local and files and folders beneath it.
This happens hour after hour.
Now here is the confusing part......
If I bring up "Task Scheduler" as the administrator and right click on that task and select run......it works.
But if I leave it for task scheduler to run it fails until that subdirectory Day.11 is created.
This is very weird.
Any ideas?
Cheers,
John
My Computers
System One System Two
-
- Computer type
- Laptop
- OS
- Windows server 2016, 2022, windows10, windows11
-
- Computer type
- PC/Desktop