Windows 10: renaming Bat file

Discus and support renaming Bat file in Windows 10 Network and Sharing to solve the problem; Dear all, I need to complete my script .bat file to rename the Res_.pdf to Res_"Folder name". Note: this code is copied from another site its working... Discussion in 'Windows 10 Network and Sharing' started by M_samiryones, Oct 29, 2020.

  1. renaming Bat file


    Dear all,

    I need to complete my script .bat file to rename the Res_.pdf to Res_"Folder name".

    Note: this code is copied from another site its working already but with the following sequence; Res_.pdf to _Res_.pdf


    Thanks.


    for /r "PATH" %%G in . do
    pushd %%G
    for %%* in . do set MyDir=%%~n*
    FOR %%v IN Res_*.* DO REN %%v "%MyDir%_%%v"
    popd

    :)
     
    M_samiryones, Oct 29, 2020
    #1
  2. Lucasonas Win User

    BAT file/Script to find and replace files

    FordGT90Concept!!!

    Your attachment is very close, it kept all the 5 numerals intact, but like you said: "it will rename them all from "#_Example_720p.zip" to "RAT_Example_#_24f_ONO.zip"...

    Greetings, Streetfighter 2

    I can't seem to get the BAT to work, but I'll still keep on trying.


    Any other suggestions, or BAT scripts Streetfighter & FordGT90Concept?
     
    Lucasonas, Oct 29, 2020
    #2
  3. Lucasonas Win User
    BAT file/Script to find and replace files

    Hi, innovative thinkers! I am looking for a BAT file or script that takes random named zips, consisting of 5 random numerals in the name, and renames the zips identical to different .txt files with that same 5 numeral in the same folder.

    Here is an example of what I mean:

    BEFORE BAT

    C:\Documents

    45678_Example_720p.zip
    34284_Example_720p.zip
    67483_Example_720p.zip

    RAT_Example_45678_24f_ONO.txt
    RAT_Example_34284_24f_ONO.txt
    RAT_Example_67483_24f_ONO.txt

    AFTER BAT

    C:\Documents

    RAT_Example_45678_24f_ONO.zip
    RAT_Example_34284_24f_ONO.zip
    RAT_Example_67483_24f_ONO.zip

    RAT_Example_45678_24f_ONO.txt
    RAT_Example_34284_24f_ONO.txt
    RAT_Example_67483_24f_ONO.txt

    I would like the BAT to take only those matching 5 numerals as a reference.

    Thanks

    *Oh Well renaming Bat file :eek:hwell:
     
    Lucasonas, Oct 29, 2020
    #3
  4. renaming Bat file

    Help with .bat to Copy and Rename to the same dir?

    Hi guys,

    Me and a friend is playing a prank on another friend, and this is pretty harmless, just a "friendly" reminder to him ^^

    So, basically, the title explains it mostly, but I will go into detail.

    What I need is a .bat that will create multiple .txt files in one directory. They must have some text in them.

    That or copy an existing .txt file, and rename the multiple copies.

    Like so:

    Copy multiple instances of filename.txt from C:/ to C:/folder/ and rename them so none of them gets deleted.

    Or

    Create filename.txt in C:/folder/ and make multiple copies of it, and rename them so none of them gets deleted.

    Hopefully this will make sense ^^

    Thanks in advance,
    Val
     
    Valenciente, Oct 29, 2020
    #4
Thema:

renaming Bat file

Loading...
  1. renaming Bat file - Similar Threads - renaming Bat file

  2. *.bat -files not starting!

    in Windows 10 Gaming
    *.bat -files not starting!: I have a friend that wants to host a Minecraft server for a few friends, and we put "java -Xmx1024M -Xms1024M -jar server.jar nogui" in "Start.bat" in a folder, but nothing happens when we start the file server.jar is also in that folder! He has Java installed and Windows 10...
  3. How to Make Windows 10 Bat File to Bulk Rename Filenames in txt file

    in Windows 10 Support
    How to Make Windows 10 Bat File to Bulk Rename Filenames in txt file: Hello, Just wondering if anyone can help me. I would like to create a bat file that will run in windows 10 that can duplicate one jpeg image file ( test.jpg. ) to a list of filenames ( one per line ) found in a text file ( test.txt ) This means if i had a list of 100 image...
  4. Read a file in a bat file

    in Windows 10 Support
    Read a file in a bat file: I have to read a file thru a bat file and get the date in the file. Once I get the date, I need it to be passed to be appended to another file. 160503
  5. Wait in .bat file

    in Windows 10 Ask Insider
    Wait in .bat file: How do I insert a wait command? I have several commands in this .bat file. I am finding some error out if they go too quickly. So here is what I would like to do. CMD 1 <Wait 5 Seconds> CMD 2 <Wait 5 Seconds> CMD 3 I do not know if this matters or not, but the...
  6. .bat file

    in Windows 10 Customization
    .bat file: I have .bat file it is not working in my new PC when I double click on it. but it was working in my old PC. could your please support how to associate .bat file in windows 10? Kindly looking for your support and reply in this regards. Thanks.....
  7. .bat files changed?

    in Windows 10 Ask Insider
    .bat files changed?: Greetings. Regarding Windows 10. I have a .bat file that I've used for... well, since forever. It rarely changes and it hasn't changed in months. Despite running quite fine in its current incarnation for some months now it's quite recently it's began throwing the error:...
  8. Windows .bat File

    in Windows 10 Network and Sharing
    Windows .bat File: I have a .bat file on a pc that is supposed to get and send a file to and from a server. This .bat file is working properly when I run it on the pc but will not when trying to run it through a 3rd party software. there have been no errors, the .bat file will start to run but...
  9. rename cmd to command >bat file dont work Solution

    in Windows 10 Customization
    rename cmd to command >bat file dont work Solution: hello guys i m look for a solution i m like to rename C:\Windows\System32\cmd.exe to C:\Windows\System32\command.exe but then i m can not open anny *.bat file can you guys help me...
  10. Help with a .bat file.

    in Windows 10 Support
    Help with a .bat file.: I have this .bat file that I've been messing around with: [img] I got it to open the Windows Update interface: [img] However, I need the .bat file to go a step further and auto click the Check for updates button circled in orange. Can someone help me to finish...