I am using "Rename File" action to rename following
extracted zip file:
abcdefghijk.zip.txt, How can I remove .zip from the new
file name?
How to custom rename
How to custom rename
You can do this by using STR Replace action (for example).
See the example below:
See the example below:
Code: Select all
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1380072790
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1196"
Hide=INTEGER|0
ID=INTEGER|766273464
LocalVariables=STRING|"FileName,NewFileName"
LogOnAsUser=INTEGER|1
Name=STRING|"remove ZIP from file name"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""FILENAME"" with value ""abcdefghijk.zip.txt"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"FILENAME"
varvalue=STRING|"abcdefghijk.zip.txt"
[Actions\Action2]
ActionID=STRING|"A_STR_REPLACE"
Enabled=INTEGER|-1
Name=STRING|"STR Replace"
Params=FOLDER
[Actions\Action2\Params]
case=STRING|"0"
mode=STRING|"0"
replacement=STRING|"."
source=STRING|"{FileName}"
substring=STRING|".zip."
variable=STRING|"NewFileName"
[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Old name: {FileName}"""
Params=FOLDER
[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"Old name: {FileName}"
msg1=STRING|"New name: {NewFileName}"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action4]
ActionID=STRING|"A_FILE_RENAME"
Enabled=INTEGER|0
Name=STRING|"Rename File"
Params=FOLDER
[Actions\Action4\Params]
count=STRING|"1"
file0=STRING|"{FileName}"
ifexists=STRING|"0"
mask=STRING|"{NewFileName}"
subdirs=STRING|"0"