471,627 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

dumping a log to temp

What's the correct way to determine the path to the temp directory? I
want to stick a log there.

Dec 19 '05 #1
2 1158
Hi,

<ap********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
What's the correct way to determine the path to the temp directory? I
want to stick a log there.


Path.GetTempFileName() will return a temp file name

If you just need the path do a Path.GetDirectoryName(
Path.GetTempFileName() )

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Dec 19 '05 #2
use the System.IO.Path.GetTempPath(), should return C:\doc and
settings\username\Local Settings\Temp

System.IO.Path.GetTempFileName get a random 8 chars + .tmp (ie.
cetqkcdd.tmp)
Dec 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by kamal | last post: by
3 posts views Thread by kerri | last post: by
6 posts views Thread by Greg Brant | last post: by
4 posts views Thread by rozrabiak | last post: by
2 posts views Thread by mr.kuhl | last post: by
10 posts views Thread by ken | last post: by
3 posts views Thread by noleander | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.