Discussion:
Copy all dll's from subdirectory
(too old to reply)
digitalshehan
2006-07-20 06:20:45 UTC
Permalink
I need to copy all dlls from a given folder, including subdirectories,
to a common location. I tried using xcopy, but wasn't successful.
It seemed that xcopy needs the absolute file path, whereas I can only
provide the relative path. This is the command I'm using:
xcopy ..\..\Server\Modules\*.dll ..\..\BuildDeployment\Repository /s

anyone got a solution?

Thanks!
foxidrive
2006-07-20 06:36:13 UTC
Permalink
Post by digitalshehan
I need to copy all dlls from a given folder, including subdirectories,
to a common location. I tried using xcopy, but wasn't successful.
It seemed that xcopy needs the absolute file path, whereas I can only
xcopy ..\..\Server\Modules\*.dll ..\..\BuildDeployment\Repository /s
anyone got a solution?
Thanks!
What seems to be the trouble? relative paths are working ok.

This is on XP Pro SP2
===[screen capture]===
Q:\xcopy.a\b\c\d>xcopy ..\..\Server\Modules\*.dll ..\..\BuildDeployment\Repository\ /s
..\..\Server\Modules\a.dll
1 File(s) copied
===[screen capture]===
digitalshehan
2006-07-20 06:59:42 UTC
Permalink
Post by foxidrive
Post by digitalshehan
I need to copy all dlls from a given folder, including subdirectories,
to a common location. I tried using xcopy, but wasn't successful.
It seemed that xcopy needs the absolute file path, whereas I can only
xcopy ..\..\Server\Modules\*.dll ..\..\BuildDeployment\Repository /s
anyone got a solution?
Thanks!
What seems to be the trouble? relative paths are working ok.
This is on XP Pro SP2
===[screen capture]===
Q:\xcopy.a\b\c\d>xcopy ..\..\Server\Modules\*.dll ..\..\BuildDeployment\Repository\ /s
..\..\Server\Modules\a.dll
1 File(s) copied
===[screen capture]===
yes it does work...I double checked the command and noticed that my
source path was wrong!!! argh!!!

But now I got another problem - it copies the dll's, but it maintains
the same directory structure as the source. I don't want the source
directory structure, I only need the all dlls from the various
subdirectories in the source all dumped into one common location.
I'm guessing its cause of the switch/parameter I'm using....

any suggestions?
t***@virgin.net
2006-07-20 11:50:33 UTC
Permalink
Post by digitalshehan
Post by foxidrive
Post by digitalshehan
I need to copy all dlls from a given folder, including subdirectories,
to a common location. I tried using xcopy, but wasn't successful.
It seemed that xcopy needs the absolute file path, whereas I can only
xcopy ..\..\Server\Modules\*.dll ..\..\BuildDeployment\Repository /s
anyone got a solution?
Thanks!
What seems to be the trouble? relative paths are working ok.
This is on XP Pro SP2
===[screen capture]===
Q:\xcopy.a\b\c\d>xcopy ..\..\Server\Modules\*.dll ..\..\BuildDeployment\Repository\ /s
..\..\Server\Modules\a.dll
1 File(s) copied
===[screen capture]===
yes it does work...I double checked the command and noticed that my
source path was wrong!!! argh!!!
But now I got another problem - it copies the dll's, but it maintains
the same directory structure as the source. I don't want the source
directory structure, I only need the all dlls from the various
subdirectories in the source all dumped into one common location.
I'm guessing its cause of the switch/parameter I'm using....
any suggestions?
What about something like this single line?
:-----START-----
FOR /R "..\..\SERVER\MODULES" %? IN (*.DLL) DO (XCOPY "%~?"
"..\..\BUILDDEPLOYMENT\REPOSITORY\">NUL)
:------END------
kleenex
2006-07-20 22:54:06 UTC
Permalink
Post by digitalshehan
I only need the all dlls from the various
subdirectories in the source all dumped into one common location.
I'm guessing its cause of the switch/parameter I'm using....
any suggestions?
Probably you have alredy solved your issues with this task, bytheway
here my suggestion.

<=== CODE START ====>

for /F "usebackq tokens=*" %i in (`dir /S /B
..\..\Server\Modules\*.dll`) do copy /Y %i
..\..\BuildDeployment\Repository

<=== CODE END ====>

regards,
kleenex

Loading...