Thursday, January 8, 2009

I am an Idiot


 OK, so I spent a couple hours fiddling with a project that should have taken a few minutes.  The kid got a PSP for for Christmas and wanted to put some music on it.  No problem... Export her iTunes Playlist and use a script to copy the files...hmmm if was only that easy.  I have a batch file that will read a txt file and use it as an input for something else that works great, but I did not realize that the (whatever.txt) line had to be different for xcopy. Also, the txt file contained "fullpath\2\whatever.ext" one on each line and in quotes.  Here is what I finially had to do to get it to work:
FOR /f "tokens=*" %%X IN ('type fullpath\2\whaterver.txt') DO (XCOPY %%X dest\ /y)
The TYPE statement is manditory! It will not work with out it.
Have fun!
-
Respectfully,
twitter @dkirkland

Posted via email from Musings, Ramblings and Other Assorted Rubbish

No comments: