|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Batch File - rename 220 files
Hi,
I am running Windows Vista Home Premium. I have a directory that contains 220 files that I want to rename. The format of some files are as follows: fileName fileNumber fileSecondaryName (common name).txt Other files are like: file Name fileNumber fileSecondaryName (common.name).txt The only differences are the space in "file name" at the beginning and a period in between the two words in the brackets. I am after a script that will rename these files by deleting the "fileName or "file name"" and "(common name)" or "(common.name)", including the brackets, from the file name. That is to: fileNumber fileSecondaryName.txt Can anyone help? Regards Noobie Thank you |
|
#2
|
|||
|
|||
|
I have been just thinking. It doesn't have to be a windows batch script. I will accept a program in any language as long as it does the job.
![]() |
|
#3
|
|||
|
|||
|
I am not sure I understand your request...
can you give an exact example of some of the actual file names? you may not need a script unless this task is going to be needed to be repeated...you may be able to use a "find and replace" application? |
|
#4
|
|||
|
|||
|
Quote:
Yes this task will need to be repeated on a regular basis but where the file names are slightly different but follow a similar format. So something which I can edit, if needed, would be ideal. Here are some actual file names: testScript [2x01] add new sales record (asd.open) testScript [2x02] delete existing sales record (asd open) testScript [2x03] modify existing sales record (asd.open) Thank you in advance. |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > Batch File - rename 220 files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|