Jump to content
Sign in to follow this  
Hit_Sqd_Maximus

Programs that list all files in a directory

Recommended Posts

Howdy'all.

I was wondering if anyone knew of any programs that will make a text file that lists the names of all of the files in the directory and sub directorys. Has anyone heard of something that can do this?

Share this post


Link to post
Share on other sites
Heh, now the question is how do you open directories in dos.  wink_o.gif

Type c: if you want C: and cd operationflashpoint\addons to get c:\operationflashpoint\addons..

cd.. to go back a dir

Share this post


Link to post
Share on other sites

If you need subdirectories "tree /F > files.txt" might be more the thing you want. You open a dos box in a folder by opening your windows menu, click on run and type in "cmd". In the dosbox you can change to the drive you want by typing its letter followed by a colon, eg "c:". Then change to the folder you want to by typing "cd folder\subfolder" or "cd folder" followed by "cd subfolder".

Share this post


Link to post
Share on other sites

Welcome, this is the H.S.A. crash guide into dos commands.

cd - change directory

cd.. - move one directory up

cd \ - move to the root directory

cd folder - move to folder

cd folder\subfolder - self explanatory

md - make directory

md folder - creates directory folder

dir - directory

dir - list the content of the directory

dir *.* - list all files of a directory (no folders)

dir *.exe - list all .exe files

you can always use /? after a command to display infos about it.

>file after a command will save all results into file

example: dir *.* > files.txt

you can find a lot about dos commands on the net, there's still MUCH more, hehe, DOS is more powerful than some would think smile_o.gif

Share this post


Link to post
Share on other sites
dir - directory

dir - list the content of the directory

dir *.* - list all files of a directory (no folders)

dir *.exe - list all .exe files

/p or was it \p I remember using it, think it pauses long list so it doesn't scroll down to the bottom, instead it shows one page at a time, you got press space to continue down to the next section and so on.

But then again, its been ages, can't remember the rest.

Share this post


Link to post
Share on other sites
/p or was it \p I remember using it, think it pauses long list so it doesn't scroll down to the bottom, instead it shows one page at a time, you got press space to continue down to the next section and so on.

But then again, its been ages, can't remember the rest.

In the original DOS it was |more, but you're right, in the xp dos command box the parameter /p is used for displaying outputs per page.

You can use the parameter /s to also list the content of sub directories, by the way.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ls -R /path/to/dir/ > list_output.txt

biggrin_o.gif

SCNR

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×