Hello,
I have a need to back-up the files I keep on shared network drive; Lets call it G:\. My goal being when I plug in my flash drive to my computer connected to that network, it automatically copies the files in question on the network drive to my flash drive; Lets call it D:\.
This link details the directions I used to make the files that execute the commands on my USB Flash Drive. I thought it would work the way I did it but obviously......
Before you ask, this is for work purposes and I cannot just auto-backup with the windows 10 utility because I do not possess admin rights over my work computer. This also keeps me from using 3rd party software to accomplish my task with these files.
How should I go about getting this to do what I need it to do?
Thanks in advance
Below is the code for each file:
Autorun.inf -
[autorun]
icon=drive.ico
open=launch.bat
action=Click ok to Run game for Windows
shell\open\command=launch.bat
_________________________________________________________
file.bat -
@echo off
:: variables
/min
SET odrive=%odrive:~0,2%
set backupcmd=xcopy /s /c /d /e /h /i /r /y
echo off
%backupcmd% "%rjg00005%\G:\Engineering\AB Programs" "%D:\%\AB Programs"
@echo off
cls
_________________________________________________________
invisible.vbs -
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
_________________________________________________________
launch.bat -
wscript.exe \invisible.vbs file.bat
I have a need to back-up the files I keep on shared network drive; Lets call it G:\. My goal being when I plug in my flash drive to my computer connected to that network, it automatically copies the files in question on the network drive to my flash drive; Lets call it D:\.
This link details the directions I used to make the files that execute the commands on my USB Flash Drive. I thought it would work the way I did it but obviously......
Before you ask, this is for work purposes and I cannot just auto-backup with the windows 10 utility because I do not possess admin rights over my work computer. This also keeps me from using 3rd party software to accomplish my task with these files.
How should I go about getting this to do what I need it to do?
Thanks in advance
Below is the code for each file:
Autorun.inf -
[autorun]
icon=drive.ico
open=launch.bat
action=Click ok to Run game for Windows
shell\open\command=launch.bat
_________________________________________________________
file.bat -
@echo off
:: variables
/min
SET odrive=%odrive:~0,2%
set backupcmd=xcopy /s /c /d /e /h /i /r /y
echo off
%backupcmd% "%rjg00005%\G:\Engineering\AB Programs" "%D:\%\AB Programs"
@echo off
cls
_________________________________________________________
invisible.vbs -
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
_________________________________________________________
launch.bat -
wscript.exe \invisible.vbs file.bat
Last edited by a moderator: