encrypting files over 60 days old.
Posted: Wed Nov 02, 2016 8:28 am
I am trying to encrypt files over 60 days old and move them to a different folder. Using a copy on a previous project I can do that. Is all I am doing is basically replacing the copy with the encrypt, the attributes are the same. The job is however encrypting all of the files regardless of the time stamp. When I run in debug the variable date is correct.
Code: Select all
project name="testPGPencryptesh" mainModule="Main" version="2.0" logLevel="debug">
<description>pull files over 60 days old</description>
<variable name="sixty_days" value="60" description="Files older than this will be moved" />
<module name="Main">
<timestamp version="1.0" disabled="false">
<format outputVariable="date" pattern="yyyy-MM-dd" dayOfMonth="-${sixty_days}" />
<format outputVariable="system.currentDate" pattern="yyyy-MM-dd" />
</timestamp>
<pgpEncrypt label="pgp encrypt" resourceId="PGP Key Ring" outputDir="<path to>\SFTPHome/EDI\Goanywhere_testing/Inbound/test/" whenFileExists="rename" processedInputFilesVariable="encrypted_files" version="1.0">
<publicKey keyID="0x337F0E11AA164582" />
<fileset dir="<path to>\test\Goanywhere_testing/Inbound/">
<dateFilter>
<exclude from="${system.currentDate}" to="${date}" />
</dateFilter>
</fileset>
</pgpEncrypt>
</module>
</project>