Archiving - files not transferred

In a multitenant setup, I am trying to get results from disconnected scans placed on a BigFix client transferred to the server - but somethign isn’t quite working…

The fixlet:

if {exists folder "c:\DisconnectedScans"}
	// Enter your action script here
	setting "_BESClient_ArchiveManager_OperatingMode"="2" on "{parameter "action issue date" of action}" for client
	setting "_BESClient_ArchiveManager_FileSet-DisconScan"="C:\DisconnectedScans\*.tar.gz" on "{parameter "action issue date" of action}" for client
	setting "_BESClient_ArchiveManager_SendAll"="0" on "{parameter "action issue date" of action}" for client
	setting "_BESClient_ArchiveManager_MaxArchiveSize" = "1000000" on "{parameter "action issue date" of action}" for client
	archive now
	
	action uses wow64 redirection false
	
	delete __appendfile
	
	appendfile {concatenation "%0d%0a" of ("del /q %22" & it & "%22") of pathnames of find files ("*.tar.gz";"*.zip") whose (now - modification time of it > 5 * day) of (it; descendant folders of it) of folders ("c:\disconnectedscans")}
	
	delete RemoveFiles.cmd
	move __appendfile RemoveFiles.cmd
	waithidden cmd /c RemoveFiles.cmd
endif

Now, on a specific client, I know that a *.tar.gz file has been put into c:\DisconnectedScans

Checking the Index.txt file for the node on the BigFix Server, I see:

FileSet-DisconScan: c:\DisconnectedScans\*.tar.gz

And I also see:

URL: file:///c%3a/DisconnectedScans/201811071358-HLUDPD01-1540876216.tar.gz
UTF8URL: file:///c%3a/DisconnectedScans/201811071358-HLUDPD01-1540876216.tar.gz
NAME: DisconScan_0_201811071358-HLUDPD01-1540876216.tar.gz
UTF8NAME: DisconScan_0_201811071358-HLUDPD01-1540876216.tar.gz
SIZE: 9605
TYPE: FILE
HASHINFO: sha256,aa5597ca9c985e09a4afe8fb53185485ea658d763fc16cf769ef46778910a0c2
MODIFIED: Wed, 07 Nov 2018 13:59:34 +0000

But the file DisconScan_0_201811071358-HLUDPD01-1540876216.tar.gz does not exist in the folder for the computer ID ?

Is it because you are running archive now before creating the file you want to archive?

I found out, that the ArchiveManager MaxArchiveSize was reached. Increasing that solved the issue.
Next challenge will be cleanup - whether I just can delete files from the computers folder, or some other approach needs to be taken.