Computing.Net > Forums > Disk Operating System > Paste File In Multiple Subdirectory

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.

Paste File In Multiple Subdirectory

Reply to Message Icon

Name: mvmtravel
Date: March 3, 2009 at 07:40:49 Pacific
OS: Windows XP
Subcategory: General
Comment:

Hi,
I am using windows XP. I have 2 files example :

c:\a.txt
c:\b.txt

I want to paste above 2 files into my multiple subfolder's (approx 220 subfolders) by batch system or any command. My destination subfolders looks like :

C:\A\mvm\travel\subdomain\afghanistan\httpdocs
C:\A\mvm\travel\subdomain\bhutan\httpdocs

and so on..

How to do this?



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: March 4, 2009 at 05:05:38 Pacific
Reply:

If you get the folder names into a txt file you can:

=====================================
@echo off & setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (myfold.txt) do (
copy c:\a.txt %%a
copy c:\b.txt %%a
)


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: Hansum Krishna
Date: June 10, 2009 at 23:08:52 Pacific
Reply:

Just listen....
make a batch file where both text files are present and copy following code in the batch file...
===

@echo off
copy a.txt C:\A\mvm\travel\subdomain\*\httpdocs
copy b.txt C:\A\mvm\travel\subdomain\*\httpdocs
pause

===

run batch file and both text files will be copied to all httpdocs folders......


0

Response Number 3
Name: Mechanix2Go
Date: June 11, 2009 at 00:22:51 Pacific
Reply:

Gee, who'da thought.

Try a little RTFM

Read the first msg.


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 4
Name: DAVEINCAPS
Date: June 11, 2009 at 00:27:23 Pacific
Reply:

I never heard of * replacing a directory. But I tried it and it didn't work. Wildcards are for files, not directories.


0

Response Number 5
Name: Mechanix2Go
Date: June 11, 2009 at 00:39:44 Pacific
Reply:

I guess his mission is to potshot stale date threads.


=====================================
If at first you don't succeed, you're about average.

M2


0

Related Posts

See More



Response Number 6
Name: Hansum Krishna
Date: June 12, 2009 at 00:56:37 Pacific
Reply:

computing.net is to discuss problems........not to pass comments......got it....
mister "Mechanix2Go"...?????

=============
hAnSuM KrIsHnA
-a bLACK hAT hACKER
'N'
-a pRO cRACKER
...........................


0

Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Paste File In Multiple Subdirectory

How do i copy and paste files in ms-dos www.computing.net/answers/dos/how-do-i-copy-and-paste-files-in-msdos/8932.html

copy a file in multiple directorie www.computing.net/answers/dos/copy-a-file-in-multiple-directorie/14089.html

How do I run bat file in each subdi www.computing.net/answers/dos/how-do-i-run-bat-file-in-each-subdi/13806.html