DOS question

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
dir *.exe, or dir *.doc, or whatever extension you want.

dir /s is recursive, so dir /s *.exe will find all EXEs.. but it will take a while and you can't cancel it with CTRL+C.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: Nothinman
Actually, IIRC, Ctrl + Pause/Break will do the trick in DOS.

Ctrl+C is a synonym for Ctrl+break.

Usually. Try them both with the "ping" program:
C:\Documents and Settings\Chris>ping -n 10 google.com

Pinging google.com [216.239.37.99] with 32 bytes of data:

Request timed out.
Reply from 216.239.37.99: bytes=32 time=186ms TTL=53
Reply from 216.239.37.99: bytes=32 time=26ms TTL=53

Ping statistics for 216.239.37.99:
Packets: Sent = 3, Received = 2, Lost = 1 (33% loss),
Approximate round trip times in milli-seconds:
Minimum = 26ms, Maximum = 186ms, Average = 106ms
Control-Break
Reply from 216.239.37.99: bytes=32 time=29ms TTL=53

Ping statistics for 216.239.37.99:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 26ms, Maximum = 186ms, Average = 80ms
Control-C
^C
C:\Documents and Settings\Chris>

Anyway, both seem to kill dir /s instantly under XP.
edit: I bolded the output of ping showing what I hit.
 

jjyiz28

Platinum Member
Jan 11, 2003
2,901
0
0
Originally posted by: MGMorden
Actually, IIRC, Ctrl + Pause/Break will do the trick in DOS.

u damn noobs are yare on crack!!

dir *.exe |more

that thing before "more" is called a "pipe", its the shift key for backslash
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: Nothinman
u damn noobs are yare on crack!!

We're the ones on crack? Your solution will only find the executables in the current directory.

I don't see why he proposes using more rather than the "dir" command's built-in page-at-a-time mode.
 

OZEE

Senior member
Feb 23, 2001
985
0
0
Originally posted by: CTho9305
Originally posted by: Nothinman
u damn noobs are yare on crack!!

We're the ones on crack? Your solution will only find the executables in the current directory.

I don't see why he proposes using more rather than the "dir" command's built-in page-at-a-time mode.

That would be the /p flag. So dir *.exe /s/p will find all .exe files on the drive, listing them a page at a time.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: OZEE
Originally posted by: CTho9305
Originally posted by: Nothinman
u damn noobs are yare on crack!!

We're the ones on crack? Your solution will only find the executables in the current directory.

I don't see why he proposes using more rather than the "dir" command's built-in page-at-a-time mode.

That would be the /p flag. So dir *.exe /s/p will find all .exe files on the drive, listing them a page at a time.

I thought I already mentioned /p. Oops :).