MultiRenameTool: RegEx Remove parts and change dot to space
Moderators: Hacker, petermad, Stefan2, white
2BullFrog
Change parameter in call rnm.vbs to
e.g.
Change parameter in call rnm.vbs to
Code: Select all
%F ([^0-9]+)\.(\d{4}).*
Code: Select all
TOTALCMD#BAR#DATA
Rnm.vbs
%F ([^0-9]+)\.(\d{4}).*
shell32.dll,115
Rename Files
1
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
#259941, TC 11.01 x64, Windows 7 SP1 x64
Yes, it should be Taken 3.
When I change it to
I get this error message
Image: http://i.imgur.com/jrbfCgj.png
Line: 7
Character: 1
Code: 800a0009
Error: Index is out of range
Source: Microsoft VBScript runtime error
This is the latest VBS script you made:
This is the current code, you changed it, because when the quality is 1080p instead of 720p it renamed improperly :Ovg wrote:2BullFrog
Tryinstead ofCode: Select all
(\w*\d{0,3})(\d{4}).*
Code: Select all
([^0-9]+)\.(\d{4}).*
Code: Select all
%F ([^0-9]+)\.(\d{4}).*
When I change it to
Code: Select all
(\w*\d{0,3})(\d{4}).*
I get this error message
Image: http://i.imgur.com/jrbfCgj.png
Line: 7
Character: 1
Code: 800a0009
Error: Index is out of range
Source: Microsoft VBScript runtime error
This is the latest VBS script you made:
Code: Select all
Set objRegExp = CreateObject("VBScript.RegExp")
Set WshArg = WScript.Arguments
Set FSO = CreateObject("Scripting.FileSystemObject")
file_name=""
new_file_name=""
flag=False
objRegExp.Pattern=WshArg.Item(1)
If WshArg.Count>1 Then
If FSO.FileExists(WshArg.Item(0)) Then
Set File = FSO.GetFile(WshArg.Item(0))
set TextStream = File.OpenAsTextStream(1)
While Not TextStream.AtEndOfStream
is_File=False
file_name=TextStream.ReadLine()
If FSO.FileExists(file_name) Then
is_File=True
End If
If is_File Then
Set File = FSO.GetFile(file_name)
Else
Set File = FSO.GetFolder(file_name)
End If
new_file_name=replace(objRegExp.Replace(FSO.GetBaseName(file_name), "$1 ($2)"),"."," ")
If is_File Then
new_file_name=new_file_name+"."+FSO.GetExtensionName(file_name)
End If
if is_File and not FSO.FileExists(new_file_name) Then
flag=True
ElseIf not is_File and not FSO.FolderExists(new_file_name) Then
flag=True
End If
if flag Then
File.Name=new_file_name
Else
msgbox "File/Folder " & new_file_name & " already exist. Can't rename ..."
End If
Wend
End If
End If
Sorry, I have read you post incorrectly!
You call script in a wrong way.
Please give me your button parameters. They should be
%F should be the first parameter! You have to change only second parameter.

You call script in a wrong way.
Please give me your button parameters. They should be
Code: Select all
TOTALCMD#BAR#DATA
Rnm.vbs
%F (\w*\d{0,3})(\d{4}).*
shell32.dll,115
Rename Files
1
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
#259941, TC 11.01 x64, Windows 7 SP1 x64
Thank you!Ovg wrote:Sorry, I have read you post incorrectly!![]()
You call script in a wrong way.
Please give me your button parameters. They should be
%F should be the first parameter! You have to change only second parameter.Code: Select all
TOTALCMD#BAR#DATA Rnm.vbs %F (\w*\d{0,3})(\d{4}).* shell32.dll,115 Rename Files 1
It is working now but making an additional space before the date, is this normal?
Code: Select all
La boum (1980)
Taken 3 (2014)
Code: Select all
La boum (1980)
Taken 3 (2014)
I think noBullFrog wrote:is this normal?

Code: Select all
TOTALCMD#BAR#DATA
Rnm.vbs
%F (\w*\d{0,3})\.(\d{4}).*
shell32.dll,115
Rename Dirs & Files
1
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
#259941, TC 11.01 x64, Windows 7 SP1 x64
Ovg wrote:I think noBullFrog wrote:is this normal?
Code: Select all
TOTALCMD#BAR#DATA Rnm.vbs %F (\w*\d{0,3})\.(\d{4}).* shell32.dll,115 Rename Dirs & Files 1
Ah the perfection! Thank you again
