mibuso.com

Microsoft Business Solutions online community
It is currently Sun May 26, 2013 6:33 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Solved] Delete TEMP files on NAV server (NAV 2009 R2)
PostPosted: Fri Jun 29, 2012 11:51 am 
Offline

Joined: Wed Jun 24, 2009 9:32 am
Posts: 21
Country: Denmark (dk)
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.

Top
 Profile E-mail  
 
 Post subject: Re: Delete TEMP files on NAV server (NAV 2009 R2)
PostPosted: Fri Jun 29, 2012 12:14 pm 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7504
Location: Milan
Country: Italy (it)
Maybe this ?
Code: Select all
[Ok :=] ERASE(Name)

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: