Auto-move file to category folders

Discuss RoboTask here
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Auto-move file to category folders

Post by Oleg »

No. It can be any string. This string is a some indicator.

See task below. This task extracts two lines after string RoboTask Renaming Begin from any text file.

;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|850444931
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task319"
Hide=INTEGER|0
ID=INTEGER|233724025
Name=STRING|"Extract Names For renaming"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=FOLDER
Action12=FOLDER
Action13=FOLDER
Action14=FOLDER
Action15=FOLDER
Action16=FOLDER
Action17=FOLDER
Action18=FOLDER
Action19=FOLDER
Action2=FOLDER
Action20=FOLDER
Action21=FOLDER
Action22=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""FILENAME_NUM"" with value ""0"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"FILENAME_NUM"
varvalue=STRING|"0"

[Actions\Action10]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action10\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"1"
value1=STRING|"{FileName_num}"
value2=STRING|"2"

[Actions\Action11]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""NEW_FILENAME"" with value ""{txt_line}"""
Params=FOLDER

[Actions\Action11\Params]
expand=STRING|"1"
varname=STRING|"NEW_FILENAME"
varvalue=STRING|"{txt_line}"

[Actions\Action12]
ActionID=STRING|"A_LOOP_BREAK"
Enabled=INTEGER|-1
Name=STRING|"Break"

[Actions\Action13]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action14]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action14\Params]
case=STRING|"0"
operator=STRING|"6"
type=STRING|"0"
value1=STRING|"RoboTask Renaming Begin"
value2=STRING|"{txt_line}"

[Actions\Action15]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""FILENAME_NUM"" with value ""1"""
Params=FOLDER

[Actions\Action15\Params]
expand=STRING|"0"
varname=STRING|"FILENAME_NUM"
varvalue=STRING|"1"

[Actions\Action16]
ActionID=STRING|"A_LOOP_CONTINUE"
Enabled=INTEGER|-1
Name=STRING|"Continue"

[Actions\Action17]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action18]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action19]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Original name: {original_filename}"""
Params=FOLDER

[Actions\Action19\Params]
icon=STRING|"1"
msg0=STRING|"Original name: {original_filename}"
msg1=STRING|"New name: {new_filename}"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action2]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""ORIGINAL_FILENAME"" with value """""
Params=FOLDER

[Actions\Action2\Params]
expand=STRING|"0"
varname=STRING|"ORIGINAL_FILENAME"

[Actions\Action20]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""NEW_FILENAME"""
Params=FOLDER

[Actions\Action20\Params]
varname=STRING|"NEW_FILENAME"

[Actions\Action21]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""ORIGINAL_FILENAME"""
Params=FOLDER

[Actions\Action21\Params]
varname=STRING|"ORIGINAL_FILENAME"

[Actions\Action22]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""FILENAME_NUM"""
Params=FOLDER

[Actions\Action22\Params]
varname=STRING|"FILENAME_NUM"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""NEW_FILENAME"" with value """""
Params=FOLDER

[Actions\Action3\Params]
expand=STRING|"0"
varname=STRING|"NEW_FILENAME"

[Actions\Action4]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER

[Actions\Action4\Params]
destvar=STRING|"TXT_LINE"
file=STRING|"C:\sometext.txt"
linecount=STRING|"0"
sourcetext=STRING|"0"

[Actions\Action5]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action5\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"1"
value1=STRING|"{FileName_num}"
value2=STRING|"1"

[Actions\Action6]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""ORIGINAL_FILENAME"" with value ""{txt_line}"""
Params=FOLDER

[Actions\Action6\Params]
expand=STRING|"1"
varname=STRING|"ORIGINAL_FILENAME"
varvalue=STRING|"{txt_line}"

[Actions\Action7]
ActionID=STRING|"A_VARIABLES_INCREMENT"
Enabled=INTEGER|-1
Name=STRING|"Increment variable ""FileName_Num"""
Params=FOLDER

[Actions\Action7\Params]
incement=STRING|"1"
vaiable=STRING|"FileName_Num"

[Actions\Action8]
ActionID=STRING|"A_LOOP_CONTINUE"
Enabled=INTEGER|-1
Name=STRING|"Continue"

[Actions\Action9]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
Prem
Posts: 35
Joined: Fri Sep 30, 2005 2:01 am
Location: Netherlands

Auto-move file to category folders

Post by Prem »

Would it be possible that you suggest a basic script for checking the filename? So the task should be "check if string abc is part of a file in folder c:\filecheck" Or do you suggest that I look in Basic scripting forums?
Since Robotask has a Basic plugin, are there simple examples available for using this plugin?
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Auto-move file to category folders

Post by Oleg »

Yes, installation program of Basic plugin contains a few examples of tasks with basic script.
Also basic plugin have complete help file about basic language.
Post Reply