Crée un nom de fichier unique basé sur un nom de fichier existant
#include <WinAPIShPath.au3>
_WinAPI_PathYetAnotherMakeUniqueName ( $sFilePath )
$sFilePath | Le nom de fichier sur lequel le nom unique sera basé. |
Succès: | Retourne le chemin d'accès complet du nom de fichier unique. |
Échec: | Retourne la chaîne vide. |
Consultez PathYetAnotherMakeUniqueName dans la librairie MSDN.
#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')