• Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto-backup Network Server files to USB Flash Drive when Drive Plugged in

Not open for further replies.


PCHF Member
Jul 14, 2019

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 -




action=Click ok to Run game for Windows



file.bat -

@echo off

:: variables


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



invisible.vbs -

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False


launch.bat -

wscript.exe \invisible.vbs file.bat
Last edited by a moderator:
a networked, work PC that allows users to run VBS scripts - what could possibly go wrong with that scenario!

why your network administrator would allow such a thing is frankly amazing.
and there's a reason why you don't have admin rights!
Not open for further replies.