Copy wild*.tsv files loop subfolders
Moderator: DosItHelp
-
- Posts: 1
- Joined: 02 Dec 2022 10:48
Copy wild*.tsv files loop subfolders
What is the best approach to copy a set of files lets say extension *.tsv from a specified folder to loop through subfolders? Example I want to copy files to all subfolders in a folder named c:\customers\subfoldernames
Re: Copy wild*.tsv files loop subfolders
If your goal is to have a copy of the files in each and every subfolder, the command would be:
The for /d option makes it loop on directories.
Then the copy command is repeated for each target directory.
Code: Select all
for /d %d in (C:\customers\subfoldernames\*) do copy *.tsv "%d"
Then the copy command is repeated for each target directory.