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

  • SEARCH
  • Home
  • 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 8318931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:08:48+00:00 2026-06-08T22:08:48+00:00

I have multiple zip files with names such as 001.zip, 002.zip, 003.zip and have

  • 0

I have multiple zip files with names such as 001.zip, 002.zip, 003.zip and have the potential to go up to 999.zip. Each zip file has exactly one text file. I would like to extract each zip file using Batch, and then rename the text file it extracted to the file name of the zip.

For example, if I extract 001.zip, I want the text file that gets extracted (all the text files that get extracted have different names) to be name 001.txt.

I at least am extracting all the files right now, but I am too unfamiliar with Batch, and am not sure if there is a simple way to do this?

cd test
echo     Decompressing zip4 data.
7z e *.zip
  • 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-08T22:08:50+00:00Added an answer on June 8, 2026 at 10:08 pm

    Try this

    md textfiles
    for %%f in (*.7z) do (
    7z e "%%f"
    move *.txt textfiles\%%~nf.txt
    )
    xcopy textfiles\*.txt originalfolder
    rd textfiles /s /q
    

    Just make sure there are no existing text files in this folder and this should work. It just creates a temporary folder and moves all text files there (only the extracted one will be present at the time but this works as the filename is not known) and renames it to the zip file name.

    After all the extractions and renames are done it just moves all the textfiles back to the original folder and deletes the temporary one.

    Hope this helps.

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

Sidebar

Related Questions

I have a big zipfile that I need to split in multiple zip files.
I have multiple zip files that have the same structure -- they contain XML
I have a text file that contains the path to multiple files in the
I am trying to download multiple PDF files as one zip file and then
I have a .zip file that contains sub-directories with html,png, and css files in
I have multiple URLs that returns zip files. Most of the files, I'm able
I have a method that extracts multiple zip files but can't delete them until
I have SSAS cube zip file schm.zip for how to create I have only
I downloaded a zip of source files containing a C# project with multiple entry
I have a standard Django Admin page that is used to upload multiple files.

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.