TeleFlow Forums
http://teleflow.org/phpbb/

Date information for files on disk
http://teleflow.org/phpbb/viewtopic.php?f=10&t=494
Page 1 of 1

Author:  fesquivel [ Mon Jan 28, 2008 3:14 pm ]
Post subject:  Date information for files on disk

Is there a way to query the date a file on disk was created and/or modified?

I'm generating account statements, which cut info up to a certain date every month, to disk files (.TXTs which later get transformed into TIFF-F with your FaxBuilder application), but I need to know if the information has to be re-generated, in case there's a more recent cut for the customer's account.

I did not find any steps for this... maybe using the BasicScript step?

Author:  Tim [ Tue Jan 29, 2008 11:36 am ]
Post subject:  Disk file information

Unfortunately, TeleFlow does not have a Step or Run Basic function you can use to get this information. Although, that is an excellent suggestion for future improvements.

I can offer a couple of suggestions you can use as a work-around.
Firstly, you could create a .DLL file in C/C++ (or some other language) that will accept a file name as a parameter and pass back the date/time stamp. Consult the TeleFlow Help under "DLL Function Step" for more information.

Secondly, you can use a trick we use here in our application development: include the latest date/time information in the file name. For example, if your file is FAX.TXT, you would instead name the file FAX-20080129-1035.TXT. To make it easy (possible) to break the date and time information out of your file name, it is best to make all the file names consistent, and break the "sections" of the file name with a special character. We use the dash, '-', character). The TeleFlow Parse Step has a feature to parse for a particular piece of text in a delimited string. If the above file name is in a variable called @MYFILE, then parse @MYFILE for Delimiting string "-", for occurrence # 2, would give you the date; ie: "20080129".

Of course, the second suggestion only works if you have control over the file creation process.

I hope this helps.

Author:  fesquivel [ Tue Jan 29, 2008 11:54 am ]
Post subject:  Ok!

I have control over the file creation process, so I may follow your suggestion and use the Parse step which, actually, I had been using quite a lot for other purposes, like creating menus with dynamic options (quantity and purpose) depending on the list of active accounts for the logged-on customer.

However, please consider the inclusion of more file-related management steps, maybe as enhancements to the Scan Folder step as well.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/