Hello,
I am trying to get a script that will count the number of files in a selected folder and append it to the end of the folder name. Below is one of the ways I tried which I thought would work but it just keeps giving errors. Any help would be greatly appreciated.
Thanks
I am trying to get a script that will count the number of files in a selected folder and append it to the end of the folder name. Below is one of the ways I tried which I thought would work but it just keeps giving errors. Any help would be greatly appreciated.
Thanks
Code:
tell application "Finder"
set FolderPath to selection
set oldBase to name of FolderPath
set numFiles to number of files in folder (((FolderPath) as text))
set newBase to oldBase & numFiles
set FolderPath to newBase
end tell