;***************************** ;* RoboTask Task file ;* Do not edit in text editor! ;***************************** [Root] ActionAfterRun=INTEGER|0 Actions=FOLDER Automat=INTEGER|-1 CatID=INTEGER|317955339 Comment=STRINGLIST ContinueOnError=INTEGER|0 ExternalName=STRING|"Task193" Hide=INTEGER|0 ID=INTEGER|710539466 LogOnAsUser=INTEGER|1 Name=STRING|"File names transformation" OnErrorTaskID=INTEGER|-1 Priority=INTEGER|3 RunOnClose=INTEGER|0 RunOnStartup=INTEGER|0 ToLog=INTEGER|3 WriteGeneralLog=INTEGER|0 [Actions] Action1=FOLDER Action2=FOLDER Action3=FOLDER Action4=FOLDER Action5=FOLDER Action6=FOLDER Action7=FOLDER [Actions\Action1] ActionID=STRING|"A_LOOP_TEXT" Enabled=INTEGER|-1 Name=STRING|"Text Loop" Params=FOLDER [Actions\Action1\Params] destvar=STRING|"CURLINE" line0=STRING|"directory\CCM_somedescript_200505111102.ext" line1=STRING|"directory1\CCM_anoterdescript_200505111105.ext" linecount=STRING|"2" sourcetext=STRING|"1" [Actions\Action2] ActionID=STRING|"A_VARIABLES_SET" Enabled=INTEGER|-1 Name=STRING|"Set variable ""FOLDER"" with value ""{ExtractFilePathNoDrive({CurLine})}""" Params=FOLDER [Actions\Action2\Params] expand=STRING|"1" varname=STRING|"FOLDER" varvalue=STRING|"{ExtractFilePathNoDrive({CurLine})}" [Actions\Action3] ActionID=STRING|"A_VARIABLES_SET" Enabled=INTEGER|-1 Name=STRING|"Set variable ""FILEEXT"" with value ""{ExtractFileExt({CurLine})}""" Params=FOLDER [Actions\Action3\Params] expand=STRING|"1" varname=STRING|"FILEEXT" varvalue=STRING|"{ExtractFileExt({CurLine})}" [Actions\Action4] ActionID=STRING|"A_VARIABLES_SET" Enabled=INTEGER|-1 Name=STRING|"Set variable ""FILENAMEONLY"" with value ""{ExtractFileNameNoExt({CurLine})}""" Params=FOLDER [Actions\Action4\Params] expand=STRING|"1" varname=STRING|"FILENAMEONLY" varvalue=STRING|"{ExtractFileNameNoExt({CurLine})}" [Actions\Action5] ActionID=STRING|"A_SCRIPT_VBSCRIPT" Enabled=INTEGER|-1 Name=STRING|"VB Script" Params=FOLDER [Actions\Action5\Params] expandvars=STRING|"0" line00000000=STRING|" 'This script retrieves old file name from" line00000001=STRING|" 'variable ""FileNameOnly"" transform it" line00000002=STRING|" 'and assign new name to variable ""NewFileNameOnly""" line00000004=STRING|" s = RoboTaskApp.ExpandText(""{FileNameOnly}"")" line00000006=STRING|" p = InStrRev(s, ""_"")" line00000008=STRING|" If p>0 Then" line00000009=STRING|" s = Left(s, p-1)" line0000000A=STRING|" End If" line0000000C=STRING|" RoboTaskApp.SetUserVariable ""NewFileNameOnly"", s" linecount=STRING|"14" savescript=STRING|"0" [Actions\Action6] ActionID=STRING|"A_DIALOG_MESSAGE" Enabled=INTEGER|-1 Name=STRING|"Show ""Folder: {Folder}""" Params=FOLDER [Actions\Action6\Params] icon=STRING|"1" msg0=STRING|"Folder: {Folder}" msg1=STRING|"File extension: {Fileext}" msg2=STRING|"Old filename:{FileNameOnly}" msg3=STRING|"New filename: {NewFileNameOnly}" msgcount=STRING|"4" playsound=STRING|"0" showmessage=STRING|"1" [Actions\Action7] ActionID=STRING|"A_LOOP_END" Enabled=INTEGER|-1 Name=STRING|"End Loop"