Bonsoir tout le monde, en fait j'aimerais savoir si il existe en batch, vbs, ou autre language de copier un fichier mais que si il existe déjà il renomme la copie.
Example : Firefox.exe. -> Firefox.exe(1), Firefox.exe(2) ainsi de suite.
Ça m'aiderai parce que j'ai tout le temps des photos qui sont nommées pareils et parfois il écrase .
Par défaut windows seven le fait tout seul mais sur XP
Tu peux utiliser if exist pour tester l'existence d'un fichier en batch.
Dans ton cas, il faudrait boucler en incrémentant un compteur de manière à ce que ça boucle tant que l'élément existe.
Voilà la description de la réponse (en anglais, mais ça se comprend assez bien je pense)
Citation :
OK, open Total Comander (TC), in the right window select the location where you want to copy your documents. Click anywhere in the left window. From menu commands select search. In search window type filter *.doc, Push drives and then localhardisk. This will select all your local hard disks (check that your external drive is not selected if you don't wanna look there). Start search. When the search is done push Feed to listbox. Now all your doc are in left window. From menu choose Mark and select all. All files are red. Press F5 (Copy). The TC will provide a window to copy files to location you choosed in right window. Press Option and now you can choose copy options. If you select Auto-rename copied, Copied files will be renamed on new location. Thats all.