Computing.Net > Forums > Disk Operating System > moving multiple files

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.

moving multiple files

Reply to Message Icon

Name: IndyB
Date: August 22, 2003 at 07:03:03 Pacific
OS: Win2K
CPU/Ram: Intel 512
Comment:

I've got the following batch file that is intended to rename all files in the "logfiles" directory...which works fine. Then I need it to move all those files into specific folders in the "urchin\pw01" directory...this is the part I'm having trouble with. I can get it to move the files into the directory, but I don't know how to put them in the specific folders.

In the "logfiles" directory the files are in folders named "W3SVC1, W3SVC2, W3SVC3, etc..." I want to move them over to the "urchin\pw01" directory into folders with the same names..."W3SVC1, W3SVC2, W3SVC3, etc..." To clarify, the files in logfiles\W3SVC1 need to be moved to urchin\pw01\W3SVC1 .

This needs to be automatic once the batch is started, no matter how many W3SVC... folders there might be.

Here's the code I have so far. Any ideas???

:: ----- rename -----
@for /R c:\test\prodweb01\logfiles\ %%f in (ex*.log) do rename "%%~ff" *.prodweb01.log


:: ----- move -----
@for /R c:\test\prodweb01\logfiles\ %%f in (ex*.log) do move "%%~ff" C:\test\urchin\pw01\



Sponsored Link
Ads by Google

Response Number 1
Name: Brian HANLON
Date: August 23, 2003 at 09:27:46 Pacific
Reply:

Have a look at:
LMOD
Versatile line/list modification tool to generate lists of commands, set variables to anything extracted from (DOS) output, and more.. Win NT/2000 compatible.
DEC 2002

At URL: http://home.mnet-online.de/horst.muc/

This gem will enable you to take a
Dir *.* /b>dlist.txt
type of list, and pipe it through LMOD to produce a BATchfile which could create the Directory from the incoming filenames, and copy them into place.

Baldy.


0
Reply to Message Icon

Related Posts

See More







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: moving multiple files

Copying multiple files www.computing.net/answers/dos/copying-multiple-files/2959.html

Moving multiple files from multiple www.computing.net/answers/dos/moving-multiple-files-from-multiple/14060.html

FIND in multiple files? www.computing.net/answers/dos/find-in-multiple-files/2165.html