Results 1 to 10 of 10

Thread: Command line for making a directory list?

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    3
    Hi again and thank you all for your replies and help tips and explanations, quite impressive, thank you so much indeed! And once more, pardon all of my ignorance! I really had never before even used the command prompt and didn't really have any notion about how it operates (thus why I wasn't aware that there indeed can't be spaces in command lines, though by then I was already suspecting) yet as a friend had commented with me that by using that command line I could easily get a list of all files stored in any specific directory, so I gave it a try. But as it didn't appear to work as I tried it for a folder named with more than one word, so I came for further enlightenment (as I couldn't quite find an answer to this particular doubt in what I had read around about it so far). And so again, thank you so greatly, all, for your such detailed and most helpful explanations, thank you indeed! (I hope it isn't unpolite if I say special thanks to TurcoLoco?... )


    I would have an additional curiosity now, though, coming from F1's reply:

    Quote Originally Posted by F1 View Post
    Under what circumstances would you need to be able to list files under XP from a command prompt?
    Would that be a hint about there being other ways (possibly easier / more practical) to make such listings under XP?... And if so, would you be so kind as to (again) please enlighten me about?... (Let's say I have all my pictures or all my fonts or all my whatever stored in a folder, and I'd wish to send a list of those to a friend. Would there be alternative ways to create that list, instead of by the command prompt, would that be it?...)


    Also I'd have an additional doubt, coming from TurcoLoco's reply:

    Quote Originally Posted by TurcoLoco View Post
    The above command would send the output to a text file (if one existed at the same location then it would be overwritten) which would list all the files, folders, sub-folders and their contents as well (due to the /s parameter), located at that path you specify. The list will be bare due to the /b parameter, meaning only the full path/file name will be written, no attributes, time/date/size related info.
    By saying that the list will be bare due to the /b parameter, does it mean that it would actually be possible to have such info such as time/date/size also included in the list, if wanted? And if so, which would then be the parameters to use, for having that info being included (especially the size, this might be an interesting addition to have in the list)?... Or, for that, should I just not use the /b parameter, and the list would by default include all that info?... (Checking the options with dir /? I don't think I found my answer there... Or perhaps it's even there and I'm such dork that I can't even recognize it? ) Again, I'd very much appreciate any further enlightenment?...


    And one more time, thank you sincerely, for your kind patience with my noob ignorance and all help!


    P.S. And thank you yet for your good humour! In some way that also always helps making a newcomer feel more "at ease"...

  2. #2
    Join Date
    Aug 2006
    Location
    255.255.255.666
    Posts
    2,056

    Lightbulb

    Quote Originally Posted by DeLuk View Post
    Hi again and thank you all for your replies and help tips and explanations,....(I hope it isn't unpolite if I say special thanks to TurcoLoco?... )
    Oh no, it wouldn't be impolite at all!

    Also I'd have an additional doubt, coming from TurcoLoco's reply:
    By saying that the list will be bare due to the /b parameter, does it mean that it would actually be possible to have such info such as time/date/size also included in the list, if wanted? And if so, which would then be the parameters to use, for having that info being included (especially the size, this might be an interesting addition to have in the list)?... Or, for that, should I just not use the /b parameter, and the list would by default include all that info?
    Unfortunately, the help included within the command line doesn't have much depth and probably written by the MS geeks who see thing as ONEs and ZEROs all the time and quite possibly be the first to join the BORG civilization.

    Back to Command Line 101 (I am, btw, thinking about creating a sticky on XP Command Line and creating batch files, etc but not sure if it is something that would get enough readers?):
    All commands include the standard output information and do not exclude any of the standard info (File path, size, create date and time). /b parameters makes the dir command ignore all that, displaying only the file name and its extension (if applicable).

    Take a look at the following example to understand better:

    C:\>cd "%temp%"
    C:\DOCUME~1\User\LOCALS~1\Temp>dir
    Volume in drive C is SYSTEM
    Volume Serial Number is 3032-CEE5
    Directory of C:\DOCUME~1\User\LOCALS~1\Temp
    11/13/2006 10:27 AM <DIR> .
    11/13/2006 10:27 AM <DIR> ..
    11/13/2006 10:19 AM 16,384 C6.tmp
    02/01/2002 04:38 PM 52,413 rwutil.chm
    11/13/2006 10:19 AM <DIR> VBE
    11/13/2006 07:30 AM 512 ~DF5A3B.tmp
    11/13/2006 10:19 AM 49,152 ~DF6B83.tmp
    11/13/2006 10:19 AM 32,768 ~DF7B21.tmp
    11/13/2006 10:19 AM 32,768 ~DF80A5.tmp
    11/13/2006 10:22 AM 27,533 ~WRD3285.doc
    7 File(s) 211,530 bytes
    3 Dir(s) 14,121,275,392 bytes free

    C:\DOCUME~1\User\LOCALS~1\Temp>dir /b
    C6.tmp
    rwutil.chm
    VBE
    ~DF5A3B.tmp
    ~DF6B83.tmp
    ~DF7B21.tmp
    ~DF80A5.tmp
    ~WRD3285.doc

    You could also download and use one of these 2 excellent freewares to do the listing of directories in a much easier way:

    LS-File List Generator

    Karen's Directory Printer


    ~TL

    And one more time, thank you sincerely, for your kind patience with my noob ignorance and all help!

    P.S. And thank you yet for your good humour! In some way that also always helps making a newcomer feel more "at ease"...
    You are quite welcome!!

    You don't seem to be ignorant since you are trying to learn...staying a 'noob' on the same topic for too long, however would be another story.
    Last edited by TurcoLoco; 11-13-2006 at 02:12 PM.

  3. #3
    Join Date
    Nov 2006
    Posts
    3
    Thank you again, TurcoLoco, for the further explanation.

    Speaking of which, at this stage I can only count my own self in as a reader candidate to that sticky on XP command line in your plans, all of a sudden certainly would come as interesting to go thru such a read, also since, yes, mostly what there seems to be around is random collections of listings of commands casually put together, yet lacking any basic background info, which leaves any noob on the subject not too confident of what to do, as well as of what NOT to do, coming to "playing around" with the command prompt, as cauzomb also well pointed out in your poll thread, thus yes, "warnings on side effects and how to avoid them should be noted", most definitely yes too. Anyway best wishes to your project, and as well thank you already for it, as certainly I myself will be one "benefitting" from it.

    And thank you yet also for both those suggestions of programs for making the listing of directories, I shall give it a try with those too, thanks. (Now here's one topic I'm definitely becoming an expert at: thanking you. )
    Last edited by DeLuk; 11-17-2006 at 09:13 AM.

  4. #4
    Join Date
    Aug 2006
    Location
    255.255.255.666
    Posts
    2,056

    Thumbs up

    You are quite welcome DeLuk. I appreciate all the kind words and support.
    I will do my best to create a noteworthy sticky on the topic but it will be a time consuming project, for that reason, I am thinking about breaking it into separate stickies. For example, Command-Line for Beginners, another for Intermediate and another for Advanced users, etc. That might make more sense....

    I will get working on this when I plan it out first and of course, as time permits.

    ~TL

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •