1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

add prefix to file name

Discussion in 'DOS/Other' started by nomad, Aug 23, 2017.

Thread Status:
Not open for further replies.
  1. nomad

    nomad Thread Starter

    Joined:
    Sep 30, 1999
    Messages:
    386
    I would like to be able to right click on a file and choose a command from the context menu to add the letters "Q-" letters to the beginning of a file. I have figured out how to add this to the registry and execute my batch file but it changes the first two letters of all files in the folder to "Q-". Can anyone help me with this? below is what i have in my batch file.

    ren *.txt Q-*.txt
     
  2. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    If your batch file is sitting in your SEND TO menu you would use the command line argument of %1.
    Code:
    ren "%~1" "Q-%~nx1"
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1195141

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice