J'ai fais une petite fonction mais le résultat n'est (presque) pas ce que je voudrais faire.
Cette fonction regarde dans un dossier existant si le dossier donné est existant, si il existe je voudrais rajouter (x) ou x représente un chiffre (à la mode microsoft si vous préférez.
Voila la fonction :
Code : Tout sélectionner
Global $Path_destination = "D:\NOM - 05102011"
Func creation_dossier()
If FileExists($Path_destination & "\") Then
$i = 2
While FileExists($Path_destination & "\")
$Path_destination = $Path_destination & " (" & $i & ")"
$i = $i + 1
WEnd
EndIf
DirCreate($Path_destination & "\" & @UserName)
EndFunc ;==>creation_dossier
Merci d'avance pour l'aide éventuelle.
(je me suis trompé de catégorie je crois)





