<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>7 Apr 2015 15:02:00 Z</lastBuildDate><pubDate>7 Apr 2015 14:16:00 Z</pubDate><description>Hey,&#13;
&#13;
I'm tracking a folder with fTrackDirectory with 2 sub dirs.&#13;
As expected when I add a file in one of the folders a procedure will run.&#13;
The odd thing is, when I add 5 files or more my service stops working.&#13;
I don't get any errors and the procedure is only run once.&#13;
&#13;
The remarks on this function tells that only 5 directories can be tracked.&#13;
But I'm talking about files, not dirs so is the documentation wrong or am I doing something wrong?&#13;
&#13;
fTrackDirectory(gsTrackFolder,handleNewFile,ftCreateFile+ftRename,True)&#13;
PROCEDURE handleNewFile(LOCAL sFileDir is string, LOCAL sFileName is string, nAction is int, sFormerFileName is string) LOCAL nNewSubscript is int = ArrayCount(garrFileList)+1 // Manual rename for retry, should be noticed IF nAction = ftRename THEN IF sFormerFileName = sFileName THEN ServiceWriteEventLog("Retry handle file, name change with no change.",elInformation) ELSE ServiceWriteEventLog("Retry handle file, name changed old name: "+sFormerFileName+" new name: "+sFileName,elInformation) END END // Finding the type and create the right class SWITCH Lower(ExtractString(sFileName,1,"\",FromBeginning)) CASE "ags" ArrayAdd(garrFileList, new AgsMessage(sFileDir+["\"]+sFileName, nNewSubscript)) ArrayDelete(garrFileList,nNewSubscript) CASE "sagitta" ArrayAdd(garrFileList, new SagittaMessage(sFileDir+["\"]+sFileName, nNewSubscript)) ArrayDelete(garrFileList,nNewSubscript) CASE "emcs" ArrayAdd(garrFileList, new EmcsMessage(sFileDir+["\"]+sFileName, nNewSubscript)) ArrayDelete(garrFileList,nNewSubscript) OTHER CASE ServiceWriteEventLog("Unknown file, can't parse... Moving file to safe location..."+RC+Lower(ExtractString(sFileDir,1,"\",FromEnd)) + " - " + sFileName, elWarning) fMoveFile(sFileDir+["\"]+sFileName, gsSaveLocation+["\"]+sFileName) END&#13;
Please don't mind the arraycount stuff, I know it's `wrong` but it isn't the problem for sure.&#13;
&#13;
Thanks in advance,&#13;
David</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51398-ftrackdirectory-5-files/read.awp</link><title>fTrackDirectory - 5 files</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51398-ftrackdirectory-5-files-51403/read.awp</comments><pubDate>7 Apr 2015 15:02:00 Z</pubDate><description>Hi David&#13;
&#13;
Maybe yo have a speed problem... If you create 5 files very rapidly, your process is going to be called 5 times as f…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51398-ftrackdirectory-5-files-51403/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51398-ftrackdirectory-5-files-51403/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/51398-ftrackdirectory-5-files/read.awp">fTrackDirectory - 5 files</source><title>Re: fTrackDirectory - 5 files</title></item></channel></rss>
