File Mover Blog

May 22, 2022

Manage the rule status change with the help of Pascal Script

Q: We would like to manage the rule status change : turn HOLD, turn Release, etc. I didn’t find any “ps” command related to this need. Could you help us to stop/hold/enable status rules? Just missing this PS command to change rule status 😉

Hope it exists…. based on type “psRuleChangeStatus( RuleID : Integer, newStatus : String/Integer… )” or something like that…
A: In our latest version v2022.5.22.0 we added two new functions that will help you.
===============================================
– Use psRuleSetHoldStatus to set the status of moving rule to HOLD. The RuleId can be found in the statusbar information.Function psRuleSetHoldStatus(_RuleId: Integer): Boolean;

i.e. psRuleSetHoldStatus(1);
===============================================
– Use psRuleSetReleaseStatus to set the status of moving rule to RELEASE. The RuleId can be found in the statusbar information.

Function psRuleSetReleaseStatus(_RuleId: Integer): Boolean;

i.e. psRuleSetReleaseStatus(1);
===============================================

FYI: In this version we also added some new Pascal Script var that can be used for example in the ‘On Destination’ and ‘On Destinations’ Pascal Script options.
  • psFileDir
  • psFileSubDir
  • psFileSubDirFirst
  • psFileSubDirLast
  • psFilePath
  • psFileSubPath
  • psFileSubPathFirst
  • psFileSubPathLast
Example:
  • WIN as Source, Root Path is C:\Scan\
  • During scan the following file was found: C:\Scan\Sub1\Sub2\Intro.pdf
Result when using the new Pascal Script var will be:
  • psFileDir > C:\Scan\Sub1\Sub2
  • psFileSubDir > Sub1\Sub2
  • psFileSubDirFirst > Sub1
  • psFileSubDirLast > Sub2
  • psFilePath  > C:\Scan\Sub1\Sub2\
  • psFileSubPath > Sub1\Sub2\
  • psFileSubPathFirst > Sub1\
  • psFileSubPathLast > Sub2\

#Filetransfer #PascalScript

If you need any info about this ‘Manage the rule status change’ request, please let us know.

Best regards,

Limagito Team

By Limagito-Team Pascal Script , Share:
SEARCH