Computing.Net > Forums > Disk Operating System > Copying from multiple directories

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Copying from multiple directories

Reply to Message Icon

Name: Will
Date: October 1, 2003 at 09:31:12 Pacific
OS: Windows 2000
CPU/Ram: P4
Comment:

I have a directory "Original" with multiple directories inside of it. Each of these directories have a .pmd that I need to copy to another directory "Print". I want to know how I can copy from the multiple directories to the "Print" directory all at once.



Sponsored Link
Ads by Google

Response Number 1
Name: hwood
Date: October 1, 2003 at 12:46:22 Pacific
Reply:

If you are running "pure" DOS XCopy should work. Windows NT and later only emulate DOS an do not have the XCopy command.


0

Response Number 2
Name: William Hopkins
Date: October 1, 2003 at 13:17:55 Pacific
Reply:

The only problem is that I can't get the files inside the directories to copy over with out copying the directory as well.

instead of directory/file.pmd I just want it to copy file.pmd


0

Response Number 3
Name: William Hopkins
Date: October 1, 2003 at 13:22:04 Pacific
Reply:

As an example when I use this:
xcopy *.pmd g:\tkas\tkas106_Iss3_4\print

Nothing copies but when I use this:
xcopy *.pmd g:\tkas\tkas106_Iss3_4\print /s

It copies the subdirectories with the files inside of them. Like so:
G:aber\aber.pmd
G:applegate\applegate.pmd
G:awards\awards.pmd
G:council\council.pmd
G:cover\cover106b.pmd
G:davidson\davidson.pmd
G:distler\distler.pmd
G:dudley\dudley.pmd
G:engel1\engel.PMD
G:engel2\engel2.pmd
G:everhart\everhart.pmd
G:foster\foster.pmd
G:goeckler\goeckler.pmd
G:rivers\rivers.pmd
G:shimada\shimada.pmd
G:skelton\skelton.pmd
G:student\awards.pmd
G:winter\winter.pmd

All I want is the files to be copied over


0

Response Number 4
Name: IVO
Date: October 2, 2003 at 01:10:46 Pacific
Reply:

Under Windows NT/2K/XP Type

For /R From_Dir %%I in (*.pmd) Do Copy /Y "%%I" To_Dir


0

Response Number 5
Name: IVO
Date: October 2, 2003 at 01:20:04 Pacific
Reply:

About my previous post, sorry I omitted to say you must embed the statement into a batch script. So save the following

@Echo Off
For /R %1 %%I in (*.pmd) Do Copy "%%I" %2

If you saved as PCopy.bat, then type

PCopy Source_Dir Destination_Dir

and the trick is done.


0

Related Posts

See More



Response Number 6
Name: Mick C
Date: October 2, 2003 at 04:23:54 Pacific
Reply:

hwood You will find XCOPY in the \Windows\System32 Folder! It is not becouse Windows XP uses an 'emulated' DOS that it cannot use many DOS commands, it is becouse Microsoft did not include the files needed! Since MS-DOS 5.0 MS has been removing commands they did not feel were of use any more. And later updates such as "Supplimental Files" & "Olddos" have had to be providded to prove them wrong! So far Microsoft have resested all requests to do so again, since they wish to Kill DOS once and for all. As long as sites such as Computing.Net, PowerLoad and many others exsist they will not do so.


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Copying from multiple directories

COPY file to multiple directories www.computing.net/answers/dos/copy-file-to-multiple-directories/14518.html

Copying folders from one directory to another www.computing.net/answers/dos/copying-folders-from-one-directory-to-another/16955.html

Can't copy from CD in DOS www.computing.net/answers/dos/cant-copy-from-cd-in-dos/10024.html