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

  • 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.
  • Hello everyone We want to personally apologize to everyone for the downtime that we've experienced. We are working to get everything back up as quickly as possible. Due to the issues we've had, your password will need to be reset. Please click the button that says "Forgot Your Password" and change it. We are working to have things back to normal. Emails are fixed and should now send properly. Thank you all for your patience. Thanks, PCHF Management
Status
Not open for further replies.

Maiqr

PCHF Member
Jul 14, 2019
16
0
36
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
 
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!
 
Sorry but as per rule: 15. PCHF can not and will not offer advice for business use or financial gain. PCHF only offers assistance for personal use.
 
Status
Not open for further replies.