Windows - How to copy one file from each sub-folder (Sampling) -
i know how java, open each folder , copy first file , next folder , on.
what want know if possible batch file? (e.g. for
loop)
to clarify again, let have folder of 1000 sub-folders , each folder includes many files (with same format , different names). want copy sample file of each folder in destination folder.
@echo off &setlocal /d %%a in (*) ( set "folder=%%~a" %%b in ("%%~a\*") set "file=%%~b" setlocal enabledelayedexpansion copy "!file!" "x:\target folder" endlocal )
Comments
Post a Comment