Expanding upon this example: Copying a file to multiple folders in the same directory
I want to copy all file .txt from C:\Newfolder\
to folder C:\Output\*\rack\*\cloth
example for destination folder:
C:\Output\name1\rack\nick1\cloth
C:\Output\name2\rack\nick2\cloth
.
.
C:\Output\name100\rack\nick100\cloth
so I have tried this:
FOR /D %%1 IN (C:\Output\*) DO (
IF EXIST "%%1\rack" (
COPY /Y C:\Newfolder\*.txt "%%1\rack\*\cloth"
)
)
the problem all txt file doesn't copied to destination folder