Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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???

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.

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?

![]() |
![]() |
![]() |

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