|
Hi,
I have made a report that allows a user to UPLOAD a file to the NAV server for processing the content of the file.
After completion, there now lies a file in the TEMP-folder for the NAV server (on my PC it is: C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\users\xxxx\)
When reading about the UPLOAD function and the File.CLOSE function, I think it sounds like the file automatically should be deleted - but that doesn't happen until I restart the NAV server service - which I don't do that often...
Can someone perhaps explain how I get rid of the files without closing the service?
***************** THE CODE **********************
IF ISSERVICETIER THEN BEGIN TempFile.CREATETEMPFILE; FileName := TempFile.NAME + '.txt'; TempFile.CLOSE; IF UPLOAD(Text001, '',Text002,'',FileName) THEN ImportCU.ImportCPRStreetReg(FileName, "ANSI-ASCII", DistributionCode.Code); CurrReport.QUIT; END ELSE ImportCU.ImportCPRStreetReg(FileName, "ANSI-ASCII", DistributionCode.Code);
******************END **************************
_________________ /Allan
Last edited by ASK_ITG on Tue Jul 03, 2012 10:16 am, edited 1 time in total.
|