Copying all Files within directories to one directory
Posted: 10 Sep 2009 10:30
I need to be able to copy only the files out of several directories and place them into one directory.
I have one directory and within that directory I have about 5 other directories. Within each of those 5 directories there are about 50 or so .tiff files.
I need to copy only the .tiff files into a single directory.
Right now I have the following command:
FOR /f %%I IN ("%userprofile%\desktop\output\*.tif") DO xcopy /s "%%I" "%userprofile%\desktop\hf"
This moves the .tiff files but it also moves the 5 directories as well, and I need it just to move the .tiff files and just lump them into one directory.
Any Ideas?
I have one directory and within that directory I have about 5 other directories. Within each of those 5 directories there are about 50 or so .tiff files.
I need to copy only the .tiff files into a single directory.
Right now I have the following command:
FOR /f %%I IN ("%userprofile%\desktop\output\*.tif") DO xcopy /s "%%I" "%userprofile%\desktop\hf"
This moves the .tiff files but it also moves the 5 directories as well, and I need it just to move the .tiff files and just lump them into one directory.
Any Ideas?