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:
[COLOR=rgb(247, 218, 100)]Autorun.inf -
[autorun]
icon=drive.ico
open=launch.bat
action=Click ok to Run game for Windows
shell\open\command=launch.bat
[COLOR=rgb(247, 218, 100)]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
[COLOR=rgb(247, 218, 100)]invisible.vbs -
CreateObject(โWscript.Shellโ).Run โโโโ & WScript.Arguments(0) & โโโโ, 0, False
[COLOR=rgb(247, 218, 100)]launch.bat -
wscript.exe \invisible.vbs file.bat[/COLOR][/COLOR][/COLOR][/COLOR]
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:
[COLOR=rgb(247, 218, 100)]Autorun.inf -
[autorun]
icon=drive.ico
open=launch.bat
action=Click ok to Run game for Windows
shell\open\command=launch.bat
[COLOR=rgb(247, 218, 100)]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
[COLOR=rgb(247, 218, 100)]invisible.vbs -
CreateObject(โWscript.Shellโ).Run โโโโ & WScript.Arguments(0) & โโโโ, 0, False
[COLOR=rgb(247, 218, 100)]launch.bat -
wscript.exe \invisible.vbs file.bat[/COLOR][/COLOR][/COLOR][/COLOR]
Comment