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

DOS Command


  • Please log in to reply
13 replies to this topic

#1 Nisha Haridas

Nisha Haridas

  • Banned Spammer
  • 1 posts
  • OFFLINE
  •  
  • Local time:10:56 AM

Posted 25 November 2010 - 05:40 AM

What is dir

BC AdBot (Login to Remove)

 


#2 Romeo29

Romeo29

    Learning To Bleep


  • Members
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:56 AM

Posted 25 November 2010 - 09:23 AM

Welcome to BleepingComputer Nisha :)

DIR command lists the contents of the a folder. If you give just DIR command without any parameters, then it will list the contents of the current folder. If you give the folder path like DIR C:\Windows then it will list the contents of that folder. How the contents are displayed and which contents are displayed, depends upon various switches like /P /E /A etc.

http://en.wikipedia.org/wiki/Dir_%28command%29
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/dir.mspx

#3 ronald110

ronald110

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:10:56 AM

Posted 14 December 2010 - 02:21 AM

Thanks for the resource of DOS command.I need them for the batch file programming. :mellow:

#4 Romeo29

Romeo29

    Learning To Bleep


  • Members
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:56 AM

Posted 14 December 2010 - 08:33 AM

You are welcome :)

#5 stgurbuz

stgurbuz

  • Members
  • 1 posts
  • OFFLINE
  •  
  • Local time:05:56 PM

Posted 27 December 2010 - 07:34 AM

What is dir

Hello,
I hope everything is OK.

I want "dir" latest date. For example in any directory there 5 files. Like below;

created date 12.27.2010 10:00 a.txt
created date 12.27.2010 11:00 b.txt
created date 10.27.2010 09:00 c.txt
created date 09.27.2010 10:00 d.txt
created date 09.27.2010 11:00 e.txt

and I want to list just specified date for example
created date 12.27.2010 a.txt
created date 12.27.2010 b.txt

only both of them.

How can I do? It is possible

#6 Eyesee

Eyesee

    Bleepin Teck Shop


  • BC Advisor
  • 3,541 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:In the middle of Kansas
  • Local time:10:56 AM

Posted 28 December 2010 - 02:56 PM

Depend on the version of Windows. I am assuming XP here.
You cannot (at least as far as I know) restrict the dir command to a specific date range.
However you can have it sort the list with the most recent on top
The syntax would be
dir /o-d

Here is a link to all the switches for the dir command
In the beginning there was the command line.

#7 rhoadesb

rhoadesb

  • Members
  • 41 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Pennsylvania, USA
  • Local time:11:56 AM

Posted 18 January 2011 - 12:44 AM

If you know basic programming, you can use Qbasic in conjunction with DOS's dir command to do what you want.

#8 426hemi#10

426hemi#10

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:09:56 AM

Posted 06 March 2011 - 09:44 AM

On a personal note I just wish I could get someone or something to teach me the ins and outs of MS-DOS or DOS or anything DOS so that I was able to work within the DOS environment I can't help but think give me a better understanding of computers because I am the only one in my household cares about the health of the machines that are used in this household I am asked to troubleshoot what I know very little to nothing about computing I cannot afford nor do I wish to spend $20,000 on education as difficult as it is to find I know that knowledge is here at my fingertips somewhere on the Internet but hasn't so far it has been very elusive I guess what I'm saying is please somebody point me in the right direction. thank you and have a nice day.

#9 426hemi#10

426hemi#10

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:09:56 AM

Posted 06 March 2011 - 09:52 AM

Let me just add to my first comment I am aware of there are books and other things to allow me to be self-taught but let me just say I suffer from certain limitations that would cause me to have to depart with monies that are already hard to come by anyway I don't believe for one minute that anything on the Internet especially in the way of education should cost more money than the initial charge for for the privilege of using Internet in the first place anything else outside of that I believe is highway robbery, robbery, robbery, the Internet was not meant to be exploited by big commercialism.

#10 Romeo29

Romeo29

    Learning To Bleep


  • Members
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:56 AM

Posted 06 March 2011 - 11:39 AM

You can learn MS-DOS from the internet tutorials. But MS-DOS is now obsolete and nobody uses it. Everybody uses Windows, and the command prompt included inside Windows has many more features than the old MS-DOS. MS-DOS was an operating system in itself and the command prompt inside Windows is just one of the features of Windows operating system.

BleepingComputer has a tutorial : http://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/

#11 Eyesee

Eyesee

    Bleepin Teck Shop


  • BC Advisor
  • 3,541 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:In the middle of Kansas
  • Local time:10:56 AM

Posted 07 March 2011 - 02:10 PM

@426hemi#10

Many of us here are well versed in MSDOS.
We would be more than happy to answer any questions you may have about it.

May I suggest though that you start your own thread for such so that your posts do not get overlooked or burried.
In the beginning there was the command line.

#12 dnthns87

dnthns87

  • Members
  • 27 posts
  • OFFLINE
  •  
  • Local time:10:56 AM

Posted 18 March 2012 - 11:19 AM

Easy enough to use set /p and for...


Try something like this?

@ECHO OFF
set /p in=-
for /f "tokens=1*" %%a in ('dir') do IF "%%a"=="%in%" (CLS&ECHO %B) ELSE ...



You could also use findstr.

Edited by dnthns87, 18 March 2012 - 11:19 AM.


#13 MJ-PC-H8R

MJ-PC-H8R

  • Members
  • 10 posts
  • OFFLINE
  •  
  • Local time:03:56 AM

Posted 26 July 2012 - 06:52 PM

I know that knowledge is here at my fingertips somewhere on the Internet but hasn't so far it has been very elusive


http://mdgx.com

Smile!

#14 Vertiglow

Vertiglow

  • Members
  • 11 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:MIDDLE OF EVERY THING
  • Local time:10:56 AM

Posted 23 December 2012 - 02:51 AM

I feel like I have been staring at a black screen with white lettering for hours again- Oh :horse: wait...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users