I have tried all day now to do the following: I have a folder with 99 subfolders. each subfolder has a pdf file inside and they all have to be renamed to carry the same name. now they are named with continuous numbers. I have been doing all my stuff with the automator as I am a novice to scripting. but i kinda don't like giving up on a problem. googling did not bring any good solutions. i have tried to make sense of example scripts and amend them, but had no success. a short try was:
tell application "Finder"
set selected to selection
open selected
get files of folders of selected
set name of files of folders to "anschreiben"
end tell
I have also tried:
tell application "Finder"
set selected to selection
open selected
set mlist to every folder of selected
set current_folder to first item of selected
set xxx to first item of current_folder
set name of xxx to "yyy"
repeat with this_folder in mlist
open current_folder
set item 1 to item of current_folder
end repeat
end tell
, but this renamed the first folder to yyy and produced and error that the file name is already given (because it renames the subfolders, not the files inside)
SO...how do I get on level deeper and rename all the files in the subfolders??
Thanks guys, I know it's probably easy for you.