Using Xcopy to copy Dir into Multiple others

January 3, 2011 at 18:23:18
Specs: Windows XP
Hi Everyone,

My DOS skills are rubbish and i was hoping htat someone out there either had a batch file or a simple string to do the following:

Copy a single directory and its contents into every directory on another drive.

we have 1500 directories on a drive into which i need to copy a directory with 2011 as its title.

Any help is appreciated.


See More: Using Xcopy to copy Dir into Multiple others

Report •


#1
January 3, 2011 at 19:37:31
UNTESTED

====================================
@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in ('dir/b/s/ad f:\') do (
echo xcopy c:\files\2011 "%%a\"
)


=====================================
Life is too important to be taken seriously.

M2


Report •

#2
January 3, 2011 at 20:14:12
Thanks i'll give it a go and report back.

Report •

Related Solutions


Ask Question