batch file to search

July 30, 2009 at 11:32:24
Specs: Windows XP, N/A
Hi guys, I think I posted this in the wrong section before. I'm trying to write a batch file to search my C drive for a specific file, and then copy that file to the desktop. For example, if I have a file myFile.ini buried somewhere on the C drive, I'd like the script to find it and copy it to my desktop. Any suggestions?

See More: batch file to search

Report •


#1
July 30, 2009 at 12:32:33
Still not the right forum, but whatever.
for /r C:\ %%a in (myFile.ini) do @if exist "%%a" copy "%%a" "%userprofile%\desktop"

Report •
Related Solutions


Ask Question