Complicated batch file... at least for me. Help Needed
Moderator: DosItHelp
Complicated batch file... at least for me. Help Needed
Without going into to much detail I have one set "known" root folder but the sub folders names will constantly be changing. I need to find away to run a batch file from root directory, scan every folder/subfolders for folders named "reports", and then copy the contents of all of the reports folders to the root directory for export. I have been able to "dir reports /s" and see all the folders out there, but I can't figure out a universal batch file that doesn't care about path to pull the contents of these folders from the sub directory's. Any help anyone may be able to provide would be helpful! Thanks in advance.
Re: Complicated batch file... at least for me. Help Needed
Code: Select all
for /f "delims=" %%i in ('dir /ad /b /s "reports"') do copy "%%i\*.*" ".\"
Steffen