How to copy files created today to folder

Discuss RoboTask here
Post Reply
patelxyz
Posts: 6
Joined: Fri Oct 07, 2005 8:40 am
Location: United States

How to copy files created today to folder

Post by patelxyz »

I reviewed the solution in another post "How to copy the latest file in a folder " but could not get this work for me for my specific need.
I have a folder named "Winfax" and type of files *.fxr in that folder. I like to copy only files created today to another folder called "newfax".
Any help is appreciated.
Thanks.
Jay
Last edited by patelxyz on Tue Sep 27, 2011 8:18 pm, edited 1 time in total.
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

How to copy files created today to folder

Post by Oleg »

See the example below.
This task detects today's files in "c:\incoming" folder

Code: Select all

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|101188231
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task1087"
Hide=INTEGER|0
ID=INTEGER|1132652351
LocalVariables=STRING|"filename,filetime"
LogOnAsUser=INTEGER|1
Name=STRING|"Detect files of today"
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
Action5=FOLDER

[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER

[Actions\Action1\Params]
createmode=STRING|"3"
createormodified=STRING|"1"
date1=STRING|"20110928"
date2=STRING|"20110928"
destvar=STRING|"FILENAME"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\incoming\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"1"
timevar=STRING|"FILETIME"
WithoutPath=STRING|"0"

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

[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"2"
type=STRING|"2"
value1=STRING|"{filetime}"
value2=STRING|"{Date}"

[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""File {filename}"""
Params=FOLDER

[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"File {filename}"
msg1=STRING|"has been changed today"
msg2=STRING|"Filetime = {filetime}"
msg4=STRING|"Put here the moving of this file to another folder"
msgcount=STRING|"5"
playsound=STRING|"0"
showmessage=STRING|"1"

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

[Actions\Action5]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
mileslowe
Posts: 2
Joined: Sun May 20, 2012 6:27 pm
Location: United States

How to copy files created today to folder

Post by mileslowe »

How to you make the code above as a new task in the
program?
rudicil2012

How to copy files created today to folder

Post by rudicil2012 »

thanks,learn it 
Post Reply