Computing.Net > Forums > Disk Operating System > copy or move and rename 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.

copy or move and rename files

Reply to Message Icon

Name: IndyB
Date: August 21, 2003 at 08:42:55 Pacific
OS: Win2k
CPU/Ram: Intel512
Comment:

I need to backup some log files on one server by copying or moving them and renaming them over on the backup server.

For example: I need to either copy or move, and rename all files with the .log extension in the following folder C:\test\prodweb01\logfiles\W3SVC1 over to the backup folder at C:\test\urchin\pw01

For the renaming, files will look like this ex030819.log but I'll need to rename them to this ex030819.prodweb01.log

Any ideas???




Sponsored Link
Ads by Google

Response Number 1
Name: hwood
Date: August 21, 2003 at 09:42:59 Pacific
Reply:

IndyB:

If you are talking "pure DOS" (Windows 2000 emulates DOS) You cannot do it. DOS allows for a maximum filename character length of eight characters a period and a three character extension. It will not allow more than one period in a filename or more characters.

If you are using the DOS emulation in Windows 2000 (and not ever going to use these with "pure DOS") it looks like your filenames can be created and used.

If it is not that many files to rename, I suggest you manually do it within Windows 2000. Otherwise you can probably create a batch file, or maybe some sort of Macro to do it for you. I'm sorry I am not familiar with using variables in batch files.


0

Response Number 2
Name: IndyB
Date: August 21, 2003 at 11:30:16 Pacific
Reply:

I am using Win2K dos emulation. There are too many to do this manually. We're setting up a backup process that will occur once a day on many directories and files.

I've been tasked to do this with dos, thus my seeking help on this forum.

I can always shorten my file names to 8 characters...that's not the issue here. I'm just looking for an example or two of how this might be done.

Anyone have any ideas?


0

Sponsored Link
Ads by Google
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: copy or move and rename files

copy or move lines from text file www.computing.net/answers/dos/copy-or-move-lines-from-text-file/8902.html

Moving or copying files www.computing.net/answers/dos/moving-or-copying-files-/13974.html

move and rename a file www.computing.net/answers/dos/move-and-rename-a-file-/12915.html