Hi,
Does anybody know how to get the "Temporary Navision Path" (TempFilePath from Navision options) within Navision. I need this path to save a Temporary file.
If this is not possible I would like to get the Windows Temporary path.
Thanks,
Emiel Romein
"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."
0
Comments
This is the way i use to use the Windows temporary folder.
============================
txtPath:=ENVIRON('temp');
IF txtPath='' THEN
ERROR('unknowned variable TEMP');
IF COPYSTR(txtPath,STRLEN(txtPath),1)<>'\' THEN
txtPath:=INSSTR(txtPath,'\',STRLEN(txtPath)+1);
recFile.RESET;
recFile.SETRANGE(Path,txtPath);
IF NOT(recFile.FIND('-')) THEN
ERROR('TEMP not set');
=============================
Hope it could help you,
Regards,
It shows you the TempFilePath. You can change it if you'd like.
-Is this what you are asking about?
http://www.BiloBeauty.com
http://www.autismspeaks.org
If it was hard to write, it should be hard to understand."
It uses the CREATETEMPFILE function, which is available from Attain 3.60.
NAV TechDays 2022: 17 & 18 November 2022, Antwerp (Belgium)
Thx y'all!
If it was hard to write, it should be hard to understand."
But be careful: Navision's TempFilePath is the TMP environment variable, not the TEMP variable. It's set on startup and will not be update during a running session.
http://www.BiloBeauty.com
http://www.autismspeaks.org
since NAV 2009 we can use the system function: TEMPORARYPATH
http://msdn.microsoft.com/en-us/library/dd338849.aspx
What can be the problem?
Thanks