OL Learn

Folder Capture Use archive attribute

Hi there,

I try to copy file from one folder to another folder.
image

so i have set up folder capture with Use archive attribute

  • Use archive attribute: Select to turn on the archive attribute of the data files found in the source folder and to leave them in their original location (i.e. to take copies of the source files). Note that PReS Workflow never takes source files that have their archive attribute turned on (so the source files will not be taken again and again). When this option is turned off, PReS Workflow removes data files from the source location.

When i run the workflow under debug model, the first test run was good. The file did copy to the target folder
However when i run it again, it keeps showing file found but no data to capture
image

Any idea?

Thanks

If you want the file to be picked up again, you need to remove the Archive Attribute on the file itself.

This can be achieved with a script that resets the archive attribute:

var fso = new ActiveXObject("Scripting.FileSystemObject");
var myFile = fso.GetFile("C:\Tests\MyFile.txt");
myFile.Attributes = myFile.Attributes | 32; // 32 is the Archive attribute

Be careful, however: if you reset the attribute before the end of the branch where the Folder Capture is located, the Folder Capture will keep considering that a new file is available and thus loop indefinitely. To prevent that from happening, put your Folder Capture inside a branch and reset your file attributes on the calling branch (or the trunk), like so:

image

1 Like

Hi Phil,

Big thanks!
That is exactly what i am looking for!