Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
HI ,
I have to copy some files from a folder which has a nested folder structure i.e the main parent folder will have some child folders and inside these child folders there will be some files.FIles can be inside the child folder i.e 3 to 4 levels down the parent folder or the files will be 1 level.
I have to write a batch script which will extract all these *.* files to one one location with out copying the child folders.
I tried using the below script but it is not giving the correct out.
for /R C:\Premium\ %%f in (*.*) do copy %%f c:\Premium_Due
Please help me how can i do this.
--Sunitha

I tried the below script
xcopy C:\A\*.\*test.txt C:\B
but I am getting invalid no of parameters , Please tell me where the issue is.
--Sunitha

@echo off & setLocal EnableDELAYedExpansion
for /f "tokens=* delims= " %%a in ('dir/s/b/a-d C:\Premium') do (
copy "%%a" d:\some\other\place
)
=====================================
Helping others achieve escape felicityM2

![]() |
PKUNZIP Error
|
Batch Program
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |