1.

Solve : Please tell me how to copy folder?

Answer»

Please tell me how to COPY folder without file inside in windws xp i TRIED this command but not help xcopy /T /Eum, well here is what i can do for you. Get the list of folders using dir, and export to a txt file

Code: [Select]dir /b "c:\path\folders location" > C:\folders.txt
then use for /f to get the list and make the new folders without FILES inside em somewhere else

Code: [Select]for /f "tokens=1*" %%a in ('type c:\files.txt') do mkdir "c:\path\%%a"
i have not been ABLE to make it work with spaces though...
Code: [Select]dir /b "c:\tests\folders\" > c:\files.txt
for /f "tokens=1*" %%a in ('type c:\files.txt') do mkdir "c:\path\%%a"
and output:
Code: [Select]C:\tests>for /F "tokens=1*" %a in ('type c:\files.txt') do mkdir "c:\path\%a"

C:\tests>mkdir "c:\path\awerawe"

C:\tests>mkdir "c:\path\gtregt"

C:\tests>mkdir "c:\path\wrwar"Quote from: BatchFileBasics on August 02, 2009, 02:12:12 PM


Code: [Select]for /f "tokens=1*" %%a in ('type c:\files.txt') do mkdir "c:\path\%%a"
i have not been able to make it work with spaces though...

if you use the following it will ACCEPT spaces.

Code: [Select]FOR /f "delims==" %%A in ('type c:\files.txt') do mkdir "c:\path\%%A"


Discussion

No Comment Found