I have a script I wrote... I pretty much know nothing about apple script and was just piecing it together with help from friends.
Im getting an error when I use it on a FAT drive... gives me an Alias problem.
Here is the script... any help would be GREATLY appreciated.
Im getting an error when I use it on a FAT drive... gives me an Alias problem.
Here is the script... any help would be GREATLY appreciated.
Code:
display dialog "Change Suffix to First Two Characters of File Name:" buttons {"Send The Pids!", "Cancel"}
set myfolder to characters 1 through -2 of (POSIX path of ((choose folder) as alias)) as text
set foundfiles to every paragraph of (do shell script "find " & quoted form of myfolder & " -type f -iname \"*.wav\"")
repeat with afile in foundfiles
set afile to ((afile as text) as POSIX file as alias)
tell application "Finder"
set filename to name of afile
set filesuffix to (characters -4 through -1 of filename) as text
set addonsuffix to characters 1 through 2 of filename
set filename to (characters 1 through -5 of filename) as text
set newfilename to filename & "_" & addonsuffix & filesuffix
set name of afile to newfilename
end tell
end repeat