On Jun 19, 2005, at 7:45 PM, Patrick Collins wrote: I ran an audio format batch conversion utility that somehow messed up, and I have about 500 files that are ending in .#0 rather than .wav -- so I am wondering if anyone has written a script that can recursively go through multiple levels of a directory and search for filenames that contain a specific thing (in this case a file like "HBE_12Z-Splash_Pa-Sch_f_D-na.#0" and rename it as "HBE_12Z-Splash_Pa-Sch_f_D-na.wav" )
set foo to choose folder tell application "Finder" set foos_files to foo's files my handle_files(foos_files whose name extension is "#0") set foos_folders to foo's folders my handle_folders(foos_folders) end tell
on handle_files(file_List) tell application "Finder" --code to change extension goes here end tell end handle_files
on handle_folders(folder_list)
tell application "Finder" repeat with this_folder in folder_list set folders_files to this_folder's files my handle_files(folders_files whose name extension is "#0") set folders_folders to this_folder's folders my handle_folders(folders_folders) end repeat end tell end handle_folders
-- You don't need to be 'straight' to fight for your country. You just need to shoot straight. -- Barry Goldwater
|