Copier et renommer fichier avec Applescript

Fermé
HAL - 31 mai 2010 à 19:44
 HAL - 2 juin 2010 à 10:27
Bonjour,

Je voudrais pouvoir copier un fichier depuis un dossier dans un dossier que j'ai créé et renommer le fichier copié (pas l'original) avec un nom contenu dans le clipboard.
j'ai essayé ça mais les deux fichiers sont renommés:

set OFormat to (cellValue of cell "Format") as string
set nomTitle to (cellValue of cell "Title") as string
set OFR to (cellValue of cell "Original Frame Rate") as string
set NUMREEL to (cellValue of cell "ReelNumber") as string
set NomReel to "REEL"
set DossierOriginaux to "ORIGINAUX"
tell application "Finder"
set monfichier to choose file
set NewName to (nomTitle &"_MIX_MULTI_"& OFormat &"_PAR_"& OFR &"_REEL"& NUMREEL &".C.wav")

set the name of monfichier to NewName

set monDossier to folder (nomTitle &"_"& DossierOriginaux &"_MIX_MULTI_"& OFormat &"_"& OFR &"_REEL"& NUMREEL) of folder (nomTitle &"_"& DossierOriginaux &"_MIX_MULTI_"& OFormat &"_"& OFR) of folder (nomTitle &"_"& DossierOriginaux &"_"& OFormat &"_"& OFR) of folder nomTitle of desktop
duplicate monfichier to monDossier
set the clipboard to NewName

end tell

Merci de votre aide!!

A voir également:

2 réponses

_Ritchi_ Messages postés 21236 Date d'inscription samedi 17 mars 2007 Statut Contributeur Dernière intervention 29 mai 2024 6 062
31 mai 2010 à 20:17
Bonjour,
Je n'ai pas la solution pour ton code, mais je voulais juste te dire qu'Il y a un petit outil qui le fait: Renamer
Ritchi
0
Merci Ritchi,
Le problème étant que le script appaartient à un script plus gros et qui effectue d'autres taches j'aimerai donc pouvoir l'intégrer totalement dans le script...
0