

InterviewSolution
Saved Bookmarks
1. |
Solve : Is it possible to .....? |
Answer» HELLO I am new to this form, so I hope I am doing this right. I just need to know if it is POSSIBLE to search a folder and all its subfolders for a type of file (like .pdf, .exe, etc...), and then copy them to another folder, or drive. Sorry, the OS I am using is Windows XP and it NEED to be in a batch file. So, if anybody can help me PLEASE reply. ONE KEY THING is that I only want the files (like .pdf, .exe, etc...), not folders. I have tried XCOPY ThanksNot really sure why you NEED batch with XP but hey, it's your call: Code: [Select]echo off for /f "delims=" %%v in ('dir /b /s c:\*.pdf') do copy %%v destdir for /f "delims=" %%v in ('dir /b /s c:\*.exe') do copy %%v destdir Change the path of the destdir to something meaningful. Also point the path of each file type to the correct directory. You can ADD as many FOR statements as you need. XCOPY works also, but it's so d*** messy. Good luck. 8-)Thank you! The whole reason I NEEDED a batch because some people I work with don't know how to work a computer that well. Nick |
|