Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8395923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:25:04+00:00 2026-06-09T20:25:04+00:00

This script works as mentioned on a previous question to add @2x to all

  • 0

This script works as mentioned on a previous question to add @2x to all files in a folder, BUT how do I make or change this apple script to remove the @2x.

set appendable to "@2x"
set theFolder to choose folder
tell application "Finder"
    set theFiles to (files of entire contents of theFolder) as alias list
    repeat with theFile in theFiles
        set FileExtension to theFile's name extension as string
        set FileName to theFile's name as string
        set FileBaseName to text 1 thru ((offset of "." in FileName) - 1) of FileName
        set theFile's name to FileBaseName & appendable & "." & FileExtension
    end repeat
end tell
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:25:05+00:00Added an answer on June 9, 2026 at 8:25 pm
    tell application "Finder"
        repeat with f in (files of entire contents of (choose folder) as alias list)
            set n to name of f
            set x to name extension of f
            if n does not end with "@2x." & x then next
            set name of f to text 1 thru (-5 - (count x)) of n & "." & x
        end repeat
    end tell
    

    It would be easier to do it in a shell: IFS=$'\n'; for f in $(find ~/Desktop -name '*@2x*'); do mv "$f" "${f//@2x/}"; done.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this script that works, but I need to change the format of
This script works fine on single click but on double click it shows both
I just finished this script it works well, but I am struggling to pass
I have this jQuery script that works fine: $(select).change(function () { var finalPrice =
What Works This sed script works as intended: $ echo -e 2\n1\n4\n3 | sed
I'm using this script which works fine for a single lightbox popup window. I
Can anyone tell me why this bash script works if I cut and paste
We have a ubuntu test server that this simple script works fine on where
I've been using this script for a long time and it works perfectly in
I have this script, works ok: #!/usr/bin/perl $key = pack(H*,3cb37efae7f4f376ebbd76cd); $str = &4\=80CHB'; $dec

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.