Temp Name Please - March 1998
I recently revisited some code I wrote a few years ago. So it becomes the tip of the month. There are times when we need to get a temporary file name or the location of the temporary folder. I created a sample VB5 program to demonstrate functions TempNamePlease and TempPathPlease.
The sample program:
The temporary folder [c:\temp\] is shown at startup. Then a temporary name, using the prefix and extension are created. You could enter a different folder, prefix or extension then click Get Temp Name to create a new temporary file name. The default prefix and extension are 'tmp'. Function TempNamePlease creates an empty file in the temporary path. The sample program deletes the empty file.
Download VB Code
Click here to download the VB 5 Source Code [5k].
Download As Word 97 Document
Click here to download this page as a zipped Word 97 Document [9k].
Previous Tip Tip Index Next Tip