Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


vistisen
2012-03-12T09:01:30Z
I want to be able to process files in a directory in order of creation date. I have a loop that lists all the files that I want to process then adds a loop that does some renaming, moving and stuff like that. The loop then has a pause to allow an external program til process the file, before taking the next file on the list

My problem is that I need process the files in the right order with the oldest file being the first to be chosen. Is there any way of setting an order by creation date in the list files step?
Sponsor
Forum information
ErikC
2012-03-13T07:16:04Z
Hi vistisen,

No not at the moment. I'm moving this post to the feature request section.

What you can do in the meantime is using an execute task using the 'dir' command. With this command you can control the sorting behaviour. Use the /O option for the sorting.

Command: c:\windows\system32\cmd.exe
Argumnts: /c dir /b /OD /A-D

  /A          Displays files with specified attributes.
  attributes   D  Directories                R  Read-only files
               H  Hidden files               A  Files ready for archiving
               S  System files               -  Prefix meaning not
  /B          Uses bare format (no heading information or summary).
  /O          List by files in sorted order.
  sortorder    N  By name (alphabetic)       S  By size (smallest first)
               E  By extension (alphabetic)  D  By date/time (oldest first)
               G  Group directories first    -  Prefix to reverse order


Regards
Erik
Uses Visualcron since 2006.
Scroll to Top