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 7179627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:10:42+00:00 2026-05-28T17:10:42+00:00

This isnt really a coding question. I need to put all my files into

  • 0

This isnt really a coding question. I need to put all my files into individual directories so each file has its own directory with the name based on the filename.
So before i go make an application to do this, does anyone know any software that can do this? like Automator or something.

  • 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-05-28T17:10:43+00:00Added an answer on May 28, 2026 at 5:10 pm

    No need to build an application. This simple one liner run from the Windows command line will move each file in a directory into a sub-directory based on the root name of the file.

    for %f in (*) do @(md "%~nf"&move "%f" "%~nf")>nul 2>&1
    

    Two files with the same base name but different extensions will be moved into the same directory. For example, “test.txt” and “text.doc” will both be moved into a directory named “test”

    Any file without an extension will not be moved.

    If you want to run this from a batch file, then

    @echo off
    for %%f in (*) do (
      md "%%~nf"
      move "%%f" "%%~nf"
    ) >nul 2>&1
    

    You requirements were not very clear. If your requirements differ, then the script can probably be modified fairly easily to suit your needs.

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

Sidebar

Related Questions

This isn't really a coding question, but I wanted to ask about what is
This isn't really a programming question but more about programming and testing tools. Is
Important: This question isn't actually really an ASP.NET question. Anyone who knows anything about
This is a question of curiosity about accepted coding practices. I'm (primarily) a Java
Ok, so this is really just a conceptual question I'm having a bit of
This is really a follow-up from this question , as I think I've solved
I apologize in advance if this is really a Super User question... I just
Maybe this isn't really feasible. But basically, I've been developing a snippet-sharing website and
Any thoughts on why this isn't working? I really thought 'ignore' would do the
As far as I can tell, this is isn't possible, so I'm really just

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.