Creates a unique filename based on an existing filename
#include <WinAPIShPath.au3>
_WinAPI_PathYetAnotherMakeUniqueName ( $sFilePath )
$sFilePath | The file name that the unique name will be based on. |
Success: | the fully qualified path of the unique file name. |
Failure: | Empty string. |
Search PathYetAnotherMakeUniqueName in MSDN Library.
#include <AutoItConstants.au3>
#include <FileConstants.au3>
#include <WinAPIShPath.au3>
DirRemove(@TempDir & '\Temp', $DIR_REMOVE)
DirCreate(@TempDir & '\Temp')
For $i = 1 To 4
FileClose(FileOpen(_WinAPI_PathYetAnotherMakeUniqueName(@TempDir & '\Temp\My File.txt'), $FO_OVERWRITE))
Next
ShellExecute(@TempDir & '\Temp')