Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

cmd prompt check dir


  • Please log in to reply
12 replies to this topic

#1 phawgg

phawgg

    Learning Daily


  • Members
  • 4,543 posts
  • OFFLINE
  •  
  • Location:Washington State, USA
  • Local time:11:52 AM

Posted 11 December 2004 - 04:12 PM

I meet with success in checking for directories with a command line
C:\dir.txt
C:\dir /b and other attributes, also

c:\WINDOWS\dir
c:\Program Files\dir
c:\Documents and settings\dir ... no problem.

How do I get a list of files using the command prompt? :thumbsup:
patiently patrolling, plenty of persisant pests n' problems ...

BC AdBot (Login to Remove)

 


#2 KoanYorel

KoanYorel

    Bleepin' Conundrum


  • Members
  • 19,461 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:65 miles due East of the "Logic Free Zone", in Md, USA
  • Local time:03:52 PM

Posted 11 December 2004 - 04:39 PM

How to Use Command Line Shortcuts - includes links to all cmd line shortcuts etc.

http://www.microsoft.com/windowsxp/using/h...ommandline.mspx

I did not search for an answer to your question - figured you'd rather peruse it all.

Here's the complete listing for the DIR Cmd

http://www.microsoft.com/resources/documen...s/en-us/dir.asp

Edited by KoanYorel, 11 December 2004 - 04:46 PM.

The only easy day was yesterday.

...some do, some don't; some will, some won't (WR)

#3 phawgg

phawgg

    Learning Daily

  • Topic Starter

  • Members
  • 4,543 posts
  • OFFLINE
  •  
  • Location:Washington State, USA
  • Local time:11:52 AM

Posted 11 December 2004 - 09:25 PM

:flowers:

I did not search for an answer to your question - figured you'd rather peruse it all.

You gotta be kiddin'. What is the answer is what I want, after hours & hours of searchin' for other things!! :thumbsup: If you perused the sick CRAP I do lookin' to find a needle -in-a-hatstack file out of 140 in just one HJT log you'd feel the same way I'm sure. :trumpet:

Edited by phawgg, 11 December 2004 - 09:31 PM.

patiently patrolling, plenty of persisant pests n' problems ...

#4 JEservices

JEservices

    helping hand


  • Members
  • 1,700 posts
  • OFFLINE
  •  
  • Location:Texas
  • Local time:01:52 PM

Posted 11 December 2004 - 10:15 PM

Are you looking to pipe the dir list into a text file, for later viewing?
We are all curious like a cat. We wonder, we ask, we learn.
Please post back when a suggestion works, so that others may learn.

#5 phawgg

phawgg

    Learning Daily

  • Topic Starter

  • Members
  • 4,543 posts
  • OFFLINE
  •  
  • Location:Washington State, USA
  • Local time:11:52 AM

Posted 11 December 2004 - 10:26 PM

I'm looking to view a complete list of all files on my C:\drive & everywhere else. Using the command prompt. :thumbsup:
patiently patrolling, plenty of persisant pests n' problems ...

#6 JEservices

JEservices

    helping hand


  • Members
  • 1,700 posts
  • OFFLINE
  •  
  • Location:Texas
  • Local time:01:52 PM

Posted 11 December 2004 - 10:49 PM

Yep, it can be done. No problem.

Even though I know you know most of these steps, I would like to go through all of them in case others would like to know :thumbsup:

Right-click the desktop and select new -> text document. Copy and paste the code below in notepad. Click file -> save as, change file name to directory list.bat, Save as type to all files, and finally click Save.

@echo off
dir c:\ *.* /s  /od>dirlist.txt

You will see a new icon that looks like a gear in a window. Double click this, and a new file will appear called dirlist.txt. Open this file, and it will be a list of every file, and the location of them.

Note: If you move this batch file to a folder, then the dirlist.txt will be made in the folder that the batch file is in. Ironically, the list will include the dirlist.txt file as well :flowers:
We are all curious like a cat. We wonder, we ask, we learn.
Please post back when a suggestion works, so that others may learn.

#7 KoanYorel

KoanYorel

    Bleepin' Conundrum


  • Members
  • 19,461 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:65 miles due East of the "Logic Free Zone", in Md, USA
  • Local time:03:52 PM

Posted 11 December 2004 - 11:03 PM

I'm thinking that "Phawgg" just might want to filter that CMD a bit.

Which is why I sent him to the MS Site on the DIR cmd.

With over 2,880 possible filtering combinations +/-, the search can be tailored to needs
rather than dumping all filenames - several hundred thousand probably.
(On my 'puter - several million.)

:thumbsup:

But enjoy your next several months of reading there bud.

:flowers:
The only easy day was yesterday.

...some do, some don't; some will, some won't (WR)

#8 tos226

tos226

    BleepIN--BleepOUT


  • Members
  • 1,577 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:LocalHost
  • Local time:03:52 PM

Posted 11 December 2004 - 11:10 PM

phawgg - Jason gave you an answer and I'll add my 5 cents:
1. in cmd window type dir /? - this will give you all options to combine.
2. Jason gave you sort by date (/od). If you want by filename, the switch is /on and since you're doing subdirectories (/s) it will if I recall correctly also sort directories at the same level.

#9 JEservices

JEservices

    helping hand


  • Members
  • 1,700 posts
  • OFFLINE
  •  
  • Location:Texas
  • Local time:01:52 PM

Posted 11 December 2004 - 11:11 PM

It can be changed to suit many needs.

replace *.* with *.jpg *.gif *.bmp (ect) to have only pictures filtered out. In this case, you can include all picture formats but they have to be listed individually such as the example.

Change c: with e: (or whichever your CD/DVD drive is) to get a list of all the files on a CD. Perfect for making a song list from a pressed CD.


If you are really feeling mischievous, you can print the list to a printer, without it even appearing on the screen :thumbsup:
We are all curious like a cat. We wonder, we ask, we learn.
Please post back when a suggestion works, so that others may learn.

#10 tos226

tos226

    BleepIN--BleepOUT


  • Members
  • 1,577 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:LocalHost
  • Local time:03:52 PM

Posted 11 December 2004 - 11:19 PM

If you are really feeling mischievous, you can print the list to a printer, without it even appearing on the screen  :thumbsup:


Well, now, whose printer? if he has 120000 files at 60 filenames/page (assuming he wants it all), that's 4 reams of office paper? Pages unnumbered to boot :flowers: .

#11 phawgg

phawgg

    Learning Daily

  • Topic Starter

  • Members
  • 4,543 posts
  • OFFLINE
  •  
  • Location:Washington State, USA
  • Local time:11:52 AM

Posted 11 December 2004 - 11:39 PM

I'm thinking that "Phawgg" just might want to filter that CMD a bit.

I am "phawgg" and I'm thinkin' I use filters on my cigarettes. :thumbsup:

in cmd window type dir /? - this will give you all options to combine.

YES, attributers to customize my list. That does help... for the directories (folders) so far in my pursuit of this understanding.

Well, now, whose printer? if he has 120000 files at 60 filenames/page (assuming he wants it all), that's 4 reams of office paper? Pages unnumbered to boot

I hate buyin' ink & I spent the greatest amount of my career years in the Printing & Publishing world. :trumpet:

I'll run the option Jason, and thank you. I've spent a couple hours this week on the question as I asked it. :flowers: I have 1.63GB's of screenshots of a fresh windowsXP professional load w/o anything else on the system & also that includes after adding SP2 in folders marked exactly the same as the folders that the actual files reside in. Thats mighty helpful, too. I cropped each screenshot to include just the list as you see it one screen at a time when you open each file with all hidden files in plain sight, and the same goes for the system files. I use it to compare what gets done at each and every download of a patch & any software changes like program installs/uninstalls. But I want to control the command prompt for only this purpose for the time being.
patiently patrolling, plenty of persisant pests n' problems ...

#12 JEservices

JEservices

    helping hand


  • Members
  • 1,700 posts
  • OFFLINE
  •  
  • Location:Texas
  • Local time:01:52 PM

Posted 12 December 2004 - 10:09 PM

Im almost positive that DOS commands will see partitions as well.

When I was confirming the code on my computer, it may me realize just how much faster DOS is :thumbsup:
We are all curious like a cat. We wonder, we ask, we learn.
Please post back when a suggestion works, so that others may learn.

#13 KoanYorel

KoanYorel

    Bleepin' Conundrum


  • Members
  • 19,461 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:65 miles due East of the "Logic Free Zone", in Md, USA
  • Local time:03:52 PM

Posted 12 December 2004 - 10:29 PM

JEService,
From the desktop as you suggested - Cmd's should recognize partions - separate drives - no.

But I've not run such from the safe mode... yet.

(For Phawgg: there is no hiddened text in this post. So, you'll need no filters here.)
(For JEServices: I just lied to Phawgg.)


Regards,
~Koan


`+'
The only easy day was yesterday.

...some do, some don't; some will, some won't (WR)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users