Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8606041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:59:52+00:00 2026-06-12T02:59:52+00:00

I had a batch script that rename files inside the folder which looked like

  • 0

I had a batch script that rename files inside the folder which looked like this:

ren B:\Backups\*.bc_ *.bc

Now I have files between many folders, the back up creates a new folder with a new name every day, and i need to rename files across several folders.
How can I do it? How to correctly use wild card in this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:59:54+00:00Added an answer on June 12, 2026 at 2:59 am

    You cannot use a wildcard in the path in your REN statement. You will have to use some form of the FOR command.

    Suppose you want to rename all *.bc_ files in the entire folder hierarchy rooted at B:\Backups.

    You could use FOR /R to iterate all .bc_ files within the hierarchy and rename each file individually.

    for /r "B:\Backups" %%F in (*.bc_) do ren "%%F" "%%~nF.bc"
    

    Or you could use FOR /D /R to iterate all the folders under the root and run your wildcard REN against each of the folders

    for /d /r "B:\Backups" %%F in (.) do ren "%%F\*.bc_" *.bc
    

    Both of the commands above are designed to be used in a batch script. Change each double percent into a single percent if you want to run the command from the command line instead of from within a batch file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had tried to make batch script that copies all *.tif files located in
I found this question which had an answer to the question of performing batch
I had this sqlcmd snippet working in batch but when I converted to powershell,
I have a batch script that eventually starts another batch file and waits for
RyanWilcox had posted a script at here , that can use the following command
Here's the case: I am creating a batch script that runs daily, parsing logfiles
I have a batch script that prompts a user for some input then outputs
I don't know VBScript, but recently I needed to write a script that had
This script is run from within a directory of OGG files. cd c:\dirWithOGG for
I want to modify my existing folder structure. I had a file tree that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.