For the challenge "Rename SRT files like AVI files "
FROM:
TV.Series.SE01.E01.avi
TV.Series.SE01.E02.avi
TV.Series.SE01.E03.avi
TVSeries Season1-Episode01.srt
TVSeries Season1-Episode02.srt
TVSeries Season1-Episode03.srt
TO:
TV.Series.SE01.E01.aviTV.Series.SE01.E02.aviTV.Series.SE01.E03.avi
TV.Series.SE01.E01.srtTV.Series.SE01.E02.srtTV.Series.SE01.E03.srt
DO:
(Best make an backup of all your files first!)1.) be sure that for all *.avi there is an corresponding *.srt file
If there are more AVi then SRT files or vice versa you will mess up your files.
2.) Selection(12) "*.srt" to see *.SRT files only
3.) select All and use context menu > Clipboard Copy > "FileName + Ext"
4.) open Excel and paste this list to column A
- Code: Select all
[ A ] [ B ] [ C ]
1 TVSeries Season1-Episode01.srt
2 TVSeries Season1-Episode02.srt
3 TVSeries Season1-Episode03.srt
5.) Selection(12) "*.avi" to see *.AVI files only
6.) select All and use context menu > Clipboard Copy > "FileName"
7.) switch to Excel and paste this list to column B
- Code: Select all
[ A ] [ B ] [ C ]
1 TVSeries Season1-Episode01.srt TV.Series.SE01.E01
2 TVSeries Season1-Episode02.srt TV.Series.SE01.E02
3 TVSeries Season1-Episode03.srt TV.Series.SE01.E03
8.) in column C type
= A1 & "|" & B1 & ".srt"
and copy this to all columns down to get:
- Code: Select all
[ A ] [ B ] [ C ]
1 TVSeries Season1-Episode01.srt TV.Series.SE01.E01 TVSeries Season1-Episode01.srt|TV.Series.SE01.E01.srt
2 TVSeries Season1-Episode02.srt TV.Series.SE01.E02 TVSeries Season1-Episode02.srt|TV.Series.SE01.E02.srt
3 TVSeries Season1-Episode03.srt TV.Series.SE01.E03 TVSeries Season1-Episode03.srt|TV.Series.SE01.E03.srt
The C column is used to rename "TVSeries Season1-Episode01.srt"
TO "TV.Series.SE01.E01.srt" and all other files according too.
So double check if this all makes sense and if all file pairs are OK!!!9.) select the C column and paste this as text to an text file:
- Code: Select all
TVSeries Season1-Episode01.srt|TV.Series.SE01.E01.srt
TVSeries Season1-Episode02.srt|TV.Series.SE01.E02.srt
TVSeries Season1-Episode03.srt|TV.Series.SE01.E03.srt
Double check if all file pairs are in sync!!!10.) In BRU use the "Renaming From A Text File" feature
to rename "TVSeries Season1-Episode01.srt"
TO "TV.Series.SE01.E01.srt"
- Code: Select all
1. Select the folder which contains the objects you wish to rename.
2. Select the files you wish to process (use CTRL or SHIFT to select multiple files).
3. Enter the renaming criteria.
Here, click the Import option on the File menu and load your file.
If the file is valid then you will see the "new name" column reflecting the contents of the text file.
4. Hit the Rename button. (This button is not enabled unless you have selected one or more files/folders to rename!)
Read the help about "Renaming From A Text File":
To use this facility, create a text file in for the correct format, for example:
Track001.mp3|Headlong.mp3
Track002.mp3|Rushes.mp3
TRACK003.mp3|AnywhereIs.mp3
As you see, there is one entry per line.
Next, click the Import option on the File menu and load your file. If the file is valid then you will see the "new name"
column reflecting the contents of the text file.
HTH?
Search Google to find out more how to work with Excel.
For example i have found an web side about Excel to help you using it: http://www.mrexcel.com/articles/function-to-merge-two-columns.php
IF that side is down, please find an picture of it there >>> http://forentmp.lima-city.de/BRU_Excel_Merge2Columns-c16.png
Find me: Rename from a list "Renaming From A Text File" renaming pairs rename textfile textlist excel sheet
###############################################################################################
- - - NEW
Use "Renaming From A Text File" and a spreadsheet to do the math, e.g to increase numbers:
http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=4&t=1935&p=4931#p4931
Can I add a specific value to a non-sequential numeric suffix in a file?
Can I add a value of 25 to each, such that...
IMAGE001 becomes IMAGE026
IMAGE002 becomes IMAGE027
IMAGE017 becomes IMAGE042
IMAGE034 becomes IMAGE059
Yes, you can do that by utilizing the "Renaming From A Text File" feature
old name | new name
To get the new names you can use a spreadsheet tool.
For your case, to increase a number, do this steps in an spreadsheet:
Column A: IMAGE001.jpg
The original name
In BRU select all files and use context menu > Clipboard Copy > "FileName + Ext"
Then open e.g. Excel and paste this list to column A
Column B:
i have left empty for no real reason, but i keep it here too since i have already taken the screen shot
Column C: =left( A1 ; len(A1) - 7 )
Name part without trailing 3 digits number:
Take whole name from left till 7 from the right (number + dot + extension => 3+1+3=7)
>> IMAGE
Column D: =right( left( A1 ; len(A1) - 4 ) ; 3 )
Number only without leading chars:
Take whole name from left without right 4 (dot + ext) >> IMAGE001
and from that the last 3 from the right (the number) >> 001
Column E: =right( "000" & D1 + 25 ; 3)
Add value of "25" to each number:
Put a lot of leading zeros plus the origin number as in column D "001", plus the addition "25", >> 0001 >> 0026
then take the last 3 from the right only >> 026
Column F: =right( A1 ; 4 )
Get the extension:
Take the right 4 of the original name (dot + ext) >> .jpg
Column G: =A1 & "|" & C1 & E1 & F1
Glue all together:
Old Name "A1", plus pipe symbol '|' for BRU, plus Name part "C1", plus new number "E1", plus extension "F1"
>> IMAGE001.jpg|IMAGE026.jpg
See a picture
http://imageshack.us/photo/my-images/827/excelbruincreasenumber.png/
Next select the G column and copy and paste it to an text file for "Renaming From A Text File" BRU option.
IMAGE001.img|IMAGE026.img
IMAGE002.img|IMAGE027.img
IMAGE017.img|IMAGE042.img
IMAGE034.img|IMAGE059.img
I have done the code to work with different name part lengths too:
IMAGE abc 001.img|IMAGE abc 026.img
IMAGE defgh 002.img|IMAGE defgh 027.img
IMAGEijkl 017.img|IMAGEijkl 042.img
IMAGEmnop034.img|IMAGEmnop059.img
##############################
Merge to lists of file names by utilizing PowerShell instead of Excel:FileList_originNames.txt contains
A.png
B.png
C.png
FileList_WantedNames.txt contains
x.png
y.png
z.png
Utilize PowerShell
PS C:\temp\workingDir> $origin = Get-Content FileList_originNames.txt
PS C:\temp\workingDir> $wanted = Get-Content FileList_WantedNames.txt
PS C:\temp\workingDir> $len = $origin.length
PS C:\temp\workingDir> $out = for($idx=0; $idx -lt $len; $idx++) { "{0}|{1}" -f $orign[$idx], $wanted[$idx] }
PS C:\temp\workingDir> $out |out-file .\merged.txt
Results in merged.txt
A.png|x.png
B.png|y.png
C.png|z.png
Now use merged.txt for BRUs "Renaming From A Text File"
Warning: this is no copy and paste solution. Rather try to understand and write it yourself into the PS console. And,... be sure to adjust the paths and names as needed.
##############################
Create many copies from one source fileWith a DOS batch: CopyOneToMany.cmd- Code: Select all
@ECHO OFF
CD %~dp0
SET base=TheNameOfTheSourceFile
SET exte=png
ECHO copy one file to many; StS 2012
ECHO working, please wait...
setLocal EnableDelayedExpansion
REM : from 1, step 1, up to 1000, do
for /L %%D in (1,1,1000) DO (
SET digit=0000%%D
SET digit=!digit:~-4!
copy %base%.%exte% %base%_!digit!.%exte% >NUL
)
ECHO. & ECHO All done! & PAUSE
With PowerShell:for($index=1; $index -lt 1001; $index++) { $CopyPattern = "TheNameOfTheSourceFile_{0:D4}.png" -f $index; copy TheNameOfTheSourceFile.png $CopyPattern; }
or
for($index=1; $index -le 1000; $index++){ copy TheNameOfTheSourceFile.wav ("TheNameOfTheSourceFile_{0:D4}.wav" -f $index) }
Results in
TheNameOfTheSourceFile_0001.png
TheNameOfTheSourceFile_0002.png
TheNameOfTheSourceFile_0003.png
...
HTH?
