Reference/GetTempFileName: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "=GetTempFileName= user_var(output) base_dir Assign to the user variable $x, the name of a temporary file. The file will have been created, so you can then overwrite it with wh...")
 
mNo edit summary
 
Line 9: Line 9:
# do something with something.dat
# do something with something.dat
Delete $0</highlight-nsis>
Delete $0</highlight-nsis>
''Command introduced with NSIS v1.90''

Latest revision as of 20:49, 4 June 2013

GetTempFileName

user_var(output) base_dir

Assign to the user variable $x, the name of a temporary file. The file will have been created, so you can then overwrite it with what you please. The name of the temporary file is guaranteed to be unique. If to want the temporary file to be created in another directory than the Windows temp directory, specify a base_dir. Delete the file when done with it.

GetTempFileName $0
File /oname=$0 something.dat
# do something with something.dat
Delete $0

Command introduced with NSIS v1.90