Copier et renommer fichier avec Applescript
HAL
-
HAL -
HAL -
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!!
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:
- Copier et renommer fichier avec Applescript
- Fichier bin - Guide
- Fichier epub - Guide
- Renommer fichier en masse - Guide
- Fichier rar - Guide
- Comment réduire la taille d'un fichier - Guide