Jump to content

File renaming in dos


Recommended Posts

Hi just thought I'd share something I found after driving myself crazy for a while...

You can append to any filename in dos using the command

Rename * **<append string here>

Or just use Ren as Ren is the same as typing Rename

If you want to use a in your append string (you have to be using XP I think) don't forget to use the following...

Rename * "**<append string here>"

You can be lazy and just leave out the final " though


I want a group of text files to end in " work.txt"

First I have to remove the ".txt" from my files:

Rename *.txt *.

Now all my "txt" files have no extensions.

So then I can add the " Work.txt" to them:

Rename * "** Work.txt"

Oh if you want to add text to the beginning it's just...

Rename * <append string here>*

This has been a public idiot announcement :)

Appologies to all that knew this already - I did try to find documentation on the net but failed (maybe this is the reason why people hate spaces in filenames - lol)

I think people should list this command with an alternative of:

Rename <filter> *<first value to find><Replacement after find>


I have one file in my directory "The Cats Cought Crabs.txt"

>Rename *.txt "*Cats Infested.txt

The file is now named "The Cats Infested.txt"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...