Batch Script:  Add .jpg to all files in a folder

Posted on 2012-08-18
Last Modified: 2012-08-18
Hi All,

I'd like to add .jpg to the end of every file in a folder.

I guess it would be something like;

dir | rename %1 %1.jpg
Question by:detox1978
    LVL 51

    Accepted Solution

    If the files have no extension currently then this should work:

    ren *. *.jpg

    LVL 2

    Author Comment


    ren *.* *.jpg

    LVL 11

    Expert Comment

    Wow! I wish earning money instead of points was THAT easy !!
    LVL 51

    Expert Comment

    by:Bill Prew
    Great, glad it was as simple as that, thanks for the feedback.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
    This article was inspired by a question here at Experts Exchange ( The requirements stated in that question are (1) reduce the file size of a large number of…
    Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now