Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

automator action needed to remove double app indication

I have converted a al my Word documents with a script to .docx before I do a upgrade to Mountain Lion from Snow Leopard. However in some files it left the .doc in the name, in others not. EG: filename.com.comx


Does anybody know if there is a way using automator of removing the .doc from the title? Idealy I drop a folder on the script and it takes all the .doc out of the title of the documents inside.


Hope someone knows how to do this, since I hate to think of doing it by hand.


Thanks

Posted on Sep 24, 2012 2:03 AM

Reply
Question marked as Best reply

Posted on Oct 3, 2012 3:16 AM

I figured it out. In Aplescript and save as application, and drop the folder that contains the field on to it.



on openthesefolders

set nameExtension to "docx" -- name extension of the search files

set textBeforeExt to ".doc" -- text to remove before the name extension

set searchText to (textBeforeExt & nameExtension)

set lenText to (length of searchText) + 1


tell application "System Events"

repeat with tFolder in thesefolders

with timeout of 0 seconds

repeat with i in (get files of tFolder whose its name ends with searchText)

set name of i to (text 1 thru -lenText of (get name of i)) & "." & nameExtension

end repeat

end timeout

end repeat

end tell

end open

1 reply
Question marked as Best reply

Oct 3, 2012 3:16 AM in response to ChangeAgent

I figured it out. In Aplescript and save as application, and drop the folder that contains the field on to it.



on openthesefolders

set nameExtension to "docx" -- name extension of the search files

set textBeforeExt to ".doc" -- text to remove before the name extension

set searchText to (textBeforeExt & nameExtension)

set lenText to (length of searchText) + 1


tell application "System Events"

repeat with tFolder in thesefolders

with timeout of 0 seconds

repeat with i in (get files of tFolder whose its name ends with searchText)

set name of i to (text 1 thru -lenText of (get name of i)) & "." & nameExtension

end repeat

end timeout

end repeat

end tell

end open

automator action needed to remove double app indication

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.