kingsc Posted June 25, 2009 Posted June 25, 2009 So I've made a batch file to search the entire computer utilizing xcopy and copy these certain types of files to an external HDD.Is there any way to force xcopy to just dump the files I want -without- building the directory structure?I just want pictures in a pictures folder, docs in a doc folder, etc.I don't want to have to sort through WINDOWS\System32\bla.jpg and Local Settings\App Data\Microsoft\<Whatever>\bla2.jpg to figure out what's junk and what's not. Here's the contents of my batch file so far.@echo off::BANNERecho ==============================================================echo ============== ==================echo ============== ExtractIT v1.0 by ==================echo ============== ==================echo ==============================================================echo.echo.::CONFIGURATIONset extractpoint="f:\EXTRACT"::PICTURE EXTRACTIONecho Performing picture extraction...echo.echo.xcopy /I /S /G /H /Q /Y /C c:\*.jpg %extractpoint%echo.echo.echo JPG files extracted.xcopy /I /S /G /H /Q /Y /C c:\*.jpeg %extractpoint%echo.echo.echo JPEG files extracted.xcopy /I /S /G /H /Q /Y /C c:\*.bmp %extractpoint%echo.echo.echo BMP files extracted.echo.echo.echo Picture extraction complete.echo.echo.echo Performing document extraction...xcopy /I /S /G /H /Q /Y /C c:\*.doc* %extractpoint%echo.echo.echo Word document extraction complete.xcopy /I /S /G /H /Q /Y /C c:\*.xls* %extractpoint%echo.echo.echo Excel spreadsheet extraction complete.xcopy /I /S /G /H /Q /Y /C c:\*.pdf %extractpoint%echo.echo.echo Adobe PDF document extraction complete.echo.echo.echo Document extraction complete.echo.echo.echo Extraction complete, have a nice day! =)echo.echo.::RESTORE ORIGINAL CONFIGURATIONset extractpoint=pause
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now