Results 1 to 12 of 12
  1. #1
    Change ALL extensions in a folder
    TotaTua's Avatar
    Member Since
    Oct 26, 2010
    Location
    Ventura County
    Posts
    6
    Specs:
    iMac 10.6.4 3.06 Core 2 Duo and MBPro 2.53 Core 2
    Change ALL extensions in a folder
    i have a folder of 7,000 images that need to have .jpg appended to all. how might i do this quickly so i can get them uploaded to Amazon store. Using MacPOS X and it doesn't care about the image extension.

    Thanks for helping the temporarily brain dead. Google was not my friend on this search.

  2. #2
    Change ALL extensions in a folder
    MYmacROX's Avatar
    Member Since
    Mar 17, 2009
    Posts
    3,626
    Specs:
    2008 15" MBP Yosemite, 2012 21.5" iMac Yosemite
    Are they currently jpg's or some other file type that need to be changed to jpg's?
    I ask because you might just need to turn on "Show All File Type Extensions" in Finder preferences.
    Or they might need to be converted as a batch and there are ways of doing that too.
    64GB iPhone 6, 64GB iPad Air 2.

    Reminder: Please include your Mac's specs. This will make it much easier for the other members to assist you.

  3. #3
    Change ALL extensions in a folder
    TotaTua's Avatar
    Member Since
    Oct 26, 2010
    Location
    Ventura County
    Posts
    6
    Specs:
    iMac 10.6.4 3.06 Core 2 Duo and MBPro 2.53 Core 2
    Quote Originally Posted by MYmacROX View Post
    Are they currently jpg's or some other file type that need to be changed to jpg's?
    I ask because you might just need to turn on "Show All File Type Extensions" in Finder preferences.
    Or they might need to be converted as a batch and there are ways of doing that too.
    they are currently NOTHING or some have extensions which will be easy enough to change a handful rather than a gazillion

  4. #4
    Change ALL extensions in a folder
    MYmacROX's Avatar
    Member Since
    Mar 17, 2009
    Posts
    3,626
    Specs:
    2008 15" MBP Yosemite, 2012 21.5" iMac Yosemite
    Did you try turning on Show all filename extensions?
    64GB iPhone 6, 64GB iPad Air 2.

    Reminder: Please include your Mac's specs. This will make it much easier for the other members to assist you.

  5. #5
    Change ALL extensions in a folder
    XJ-linux's Avatar
    Member Since
    Jul 02, 2007
    Location
    Going Galt...
    Posts
    3,418
    Specs:
    MacBookAir5,2:10.9.5-MacMini3,1:10.9.5-iPhone6,1:8.3
    You could cd to the directory and type this script in, hitting the enter key after each line...

    ls > file
    for i in `cat file`; do
    mv $i $i.jpg
    done
    Never judge a man, untill you have walked a mile in his shoes...
    That way you'll be a mile away from him, and you'll have his shoes.

  6. #6
    Change ALL extensions in a folder
    TotaTua's Avatar
    Member Since
    Oct 26, 2010
    Location
    Ventura County
    Posts
    6
    Specs:
    iMac 10.6.4 3.06 Core 2 Duo and MBPro 2.53 Core 2
    Quote Originally Posted by MYmacROX View Post
    Did you try turning on Show all filename extensions?
    Thanks yes i did. these files have no extensions currently because they weren't needed originally.
    TIA for your time which is valuable.
    Claudia

  7. #7
    Change ALL extensions in a folder
    TotaTua's Avatar
    Member Since
    Oct 26, 2010
    Location
    Ventura County
    Posts
    6
    Specs:
    iMac 10.6.4 3.06 Core 2 Duo and MBPro 2.53 Core 2
    Quote Originally Posted by XJ-linux View Post
    You could cd to the directory and type this script in, hitting the enter key after each line...

    ls > file
    for i in `cat file`; do
    mv $i $i.jpg
    done
    have no idea how to do what you have suggested. that is similar to something i did long ago and far away on a pc. is this a terminal operation? sorry for being dense.
    TIA for your time which is valuable.
    Claudia

  8. #8
    Change ALL extensions in a folder
    XJ-linux's Avatar
    Member Since
    Jul 02, 2007
    Location
    Going Galt...
    Posts
    3,418
    Specs:
    MacBookAir5,2:10.9.5-MacMini3,1:10.9.5-iPhone6,1:8.3
    Yep. Just open the terminal.app and cd to the directory the files are in. Tpye pwd to double check you are in the correct directory.
    Never judge a man, untill you have walked a mile in his shoes...
    That way you'll be a mile away from him, and you'll have his shoes.

  9. #9
    Change ALL extensions in a folder
    XJ-linux's Avatar
    Member Since
    Jul 02, 2007
    Location
    Going Galt...
    Posts
    3,418
    Specs:
    MacBookAir5,2:10.9.5-MacMini3,1:10.9.5-iPhone6,1:8.3
    Here's an example where I do this in a directory called /Users/username/test on four files named test1, test2, test3 and test4:

    MacGyver:test username$ pwd
    /Users/dcram/test
    MacGyver:test username$ ls > file
    MacGyver:test username$ for i in `cat file`; do
    > mv $i $i.jpg
    > done
    MacGyver:test username$ ls
    file.jpg test1.jpg test2.jpg test3.jpg test4.jpg
    MacGyver:test username$ rm file.jpg
    MacGyver:test username$ ls
    test1.jpg test2.jpg test3.jpg test4.jpg
    MacGyver:test username$
    Never judge a man, untill you have walked a mile in his shoes...
    That way you'll be a mile away from him, and you'll have his shoes.

  10. #10
    Change ALL extensions in a folder
    TotaTua's Avatar
    Member Since
    Oct 26, 2010
    Location
    Ventura County
    Posts
    6
    Specs:
    iMac 10.6.4 3.06 Core 2 Duo and MBPro 2.53 Core 2
    Quote Originally Posted by XJ-linux View Post
    Here's an example where I do this in a directory called /Users/username/test on four files named test1, test2, test3 and test4:
    THANK YOU, so can i assume that dos commands work in Terminal? i have been reluctant to work in terminal b/c of horror stories. Your script made it easy peasy!
    TIA for your time which is valuable.
    Claudia

  11. #11
    Change ALL extensions in a folder
    XJ-linux's Avatar
    Member Since
    Jul 02, 2007
    Location
    Going Galt...
    Posts
    3,418
    Specs:
    MacBookAir5,2:10.9.5-MacMini3,1:10.9.5-iPhone6,1:8.3
    Glad it worked. These are Unix commands, not DOS. Similar but different so please never try running DOS commands on a Mac.
    Never judge a man, untill you have walked a mile in his shoes...
    That way you'll be a mile away from him, and you'll have his shoes.

  12. #12
    Change ALL extensions in a folder
    TotaTua's Avatar
    Member Since
    Oct 26, 2010
    Location
    Ventura County
    Posts
    6
    Specs:
    iMac 10.6.4 3.06 Core 2 Duo and MBPro 2.53 Core 2
    Quote Originally Posted by XJ-linux View Post
    Glad it worked. These are Unix commands, not DOS. Similar but different so please never try running DOS commands on a Mac.
    so how would i modify the script for an if command.
    if the extension is .doc don't change is what I am trying to do.
    it is the wildcards that i don't understand.
    TIA for your time which is valuable.
    Claudia

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. .jar (Java?) extensions in my Applications Folder
    By kcsummer in forum OS X - Operating System
    Replies: 4
    Last Post: 12-09-2012, 05:48 PM
  2. Change Default Program for File Extensions
    By Fugue in forum OS X - Operating System
    Replies: 2
    Last Post: 10-08-2009, 11:19 PM
  3. Can you change the home folder name?
    By iTone in forum OS X - Operating System
    Replies: 1
    Last Post: 05-05-2009, 08:22 PM
  4. What do you use to change music extensions?
    By PozerPhoLife in forum Music, Audio, and Podcasting
    Replies: 1
    Last Post: 11-26-2007, 01:30 AM
  5. How do I change a folder icon?
    By ferritt in forum OS X - Operating System
    Replies: 4
    Last Post: 02-13-2007, 07:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •