-1

i'm trying to move file from 1 server to an other with schedule batch file, for that i use google drive as a third part where i store my files. i have made some script

@echo "executed %date:~-10,2%%date:~-7,2%%date:~-4,4%" >> Logs.txt

copy /y "C:\backup\Portal2%date:~-10,2%%date:~-7,2%%date:~-4,4%.bak" "c:\users\administrator\google drive\"

this script move a file from a directory to an other, it works fine if i click it,but if i try to schedule it doesn't work. I tried to change path to a random path in my computer and scheduled it, it worked perfectly.

its like my computer doesn't recognize google drive at all.

foxidrive
  • 40,353
  • 10
  • 53
  • 68
user3189504
  • 161
  • 1
  • 1
  • 12

2 Answers2

0

When copying over a network you need to use credentials in the scheduled task that have access to the network resource.

foxidrive
  • 40,353
  • 10
  • 53
  • 68
  • in fact i'm using 3 servers. in all three of them i have installed google drive with the same account. in this way i can avoid transfer data to shared folder among servers or even avoid credentials – user3189504 Sep 05 '14 at 15:01
0

This is probably a bit late for you but might be helpful to others who follow in your footsteps. I had this problem and it came down to security. When you run something in batch it doesn't have the correct permissions. I can't remember the exact solution but you need to set the batch task to run with your username.

Martin
  • 1