Need help with Command Prompt.

pluto

OSNN Addict
Joined
31 Jan 2004
Messages
202
Im trying to create a txt file with the list of folders in a directory in the format:

[level1]/[level2]

I have managed this before but I have forgotten the commands and on the Microsoft site, I cant find the commands to remove the date and format it how I want on their either anymore.

Can anyone help?

I got as far as:

dir >a.txt /b

but that just shows [level1]. Need it to show level2 as well.

EDIT - I need to filter out all folders but ones with 2006 in the name.

[level1]/2006 [level2]
 
Last edited:
To make a list of files within a directory
run command
cd <dir>
dir > file.txt
 
Open a DOS prompt and type "tree" and see if that gives you want you are looking for.
 
madmatt said:
To make a list of files within a directory
run command
cd <dir>
dir > file.txt
Ahhhhhh,just worked that one out.

the_tazinator said:
Open a DOS prompt and type "tree" and see if that gives you want you are looking for.

Oooooh, that might come in handy but was not what I was looking for.

Thanks anyway.

How do I filter out folders? Say, folders are named 2000, 2001, 2002, 2003, 2004, how can I filter to only show folders with the date of 2002?
 
Ok! Worked it out, solution as follows:

dir /a:d /s/b | find "2006" >a.txt

:dead:
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back