Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
plz some one help this code is for Auto create folder based on filename and move the file into it's folder but i want to change something i want to create folder same filename into one more same name folder the file move to folder into folder into folder i think you understand what i want to say

What I have tried:

@echo off
for %%i in (*) do (
 if not "%%~ni" == "organize" (
  md "%%~ni" && move "%%~i" "%%~ni"
 )
)
Posted
Updated 24-Jul-22 23:12pm
v2
Comments
OriginalGriff 25-Jul-22 4:48am    
"i think you understand what i want to say"

Nope, not a clue.
How about giving an example of the initial folder status, and the result you expect?

Then explain what you have tried, and what happened when you did.

And then tell us what that code is, and what code language you expect - becuase that code sure isn't C++ ...

Use the "Improve question" widget (hover your mouse over the question and it'll appear at the bottom) to edit your question and provide better information.
Richard MacCutchan 25-Jul-22 5:04am    
As far as I can see, that code does what you want. So you need to explain what it does not do.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900