I have many files (excel, word, jpeg and pdf) in OS 9 system. These files haven’t got extensions and the stupid windows doesn’t know what type of files are they…
Could somebody help me, to put the extension after the file name with applescript?
Thanks!!!
vias
Model: PM G5
Browser: Firefox 1.5.0.1
Operating System: Mac OS X (10.3.9)
set a to choose folder
tell application "Finder"
set no_ext to (a's files whose name extension is missing value)
repeat with a_file in no_ext
set a_file's name to (a_file's name & ".doc")
end repeat
end tell
It will take all the files within the chosen folder and add the .doc to the end of the filename, as long as there is no extension in the first place. If it works for you, simply change this line:
set a_file's name to (a_file's name & ".doc")
to this for the Excel files:
set a_file's name to (a_file's name & ".xls")
Bear in mind that this will change EVERY file within a chosen folder, so be sure that you have your files sorted out correctly.