Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

find files - dos batch

Original Message
Name: User123456789
Date: February 2, 2008 at 09:42:34 Pacific
Subject: find files - dos batch
OS: xp pro sp2
CPU/Ram: n/a
Model/Manufacturer: n/a
Comment:
What's the DOS replacement for the Windows Explorer search functionality ?

Had written a long question, but posted in wrong forum, cannot repost.

Argh. Want to look for files but also on timestamp and size crtiteria, on top of file naming and location.

Hi there.


Report Offensive Message For Removal


Response Number 1
Name: Mechanix2Go
Date: February 3, 2008 at 00:24:22 Pacific
Subject: find files - dos batch
Reply: (edit)
chkdsk /v c: | find "filename.ext"


=====================================
If at first you don't succeed, you're about average.

M2



Report Offensive Follow Up For Removal

Response Number 2
Name: User123456789
Date: February 3, 2008 at 06:22:42 Pacific
Subject: find files - dos batch
Reply: (edit)
Everybody has got right on an off-day

C:\>chkdsk /v c:
The type of the file system is NTFS.
Volume label is OS.

WARNING! F parameter not specified.
Running CHKDSK in read-only mode.

CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
Index verification completed.
Detected minor inconsistencies on the drive. This is not a corruption.
CHKDSK is verifying security descriptors (stage 3 of 3)...
Cleaning up 2 unused index entries from index $SII of file 9.
Cleaning up 2 unused index entries from index $SDH of file 9.
Cleaning up 2 unused security descriptors.
Security descriptor verification completed.
Correcting errors in the Volume Bitmap.
Windows found problems with the file system.
Run CHKDSK with the /F (fix) option to correct these.

72597703 KB total disk space.
9328552 KB in 34958 files.
11320 KB in 3076 indexes.
0 KB in bad sectors.
226767 KB in use by the system.
65536 KB occupied by the log file.
63031064 KB available on disk.

4096 bytes in each allocation unit.
18149425 total allocation units on disk.
15757766 allocation units available on disk.

C:\>


Hi there.


Report Offensive Follow Up For Removal

Response Number 3
Name: Razor2.3
Date: February 3, 2008 at 17:58:26 Pacific
Subject: find files - dos batch
Reply: (edit)
Cute, Mechanix2Go. Instead of teaching him the error of his ways, you followed his request to the letter and gave him something that would work in DOS, but not WinXP's Command Prompt.

That sounds like something I'd do.


Report Offensive Follow Up For Removal

Response Number 4
Name: Mechanix2Go
Date: February 4, 2008 at 01:55:01 Pacific
Subject: find files - dos batch
Reply: (edit)
Hi Razor2.3

I'll take that as a complement.

Actually it WILL work in NT5 but only on FAT; not NTFS.


=====================================
If at first you don't succeed, you're about average.

M2



Report Offensive Follow Up For Removal

Response Number 5
Name: User123456789
Date: February 4, 2008 at 03:45:40 Pacific
Subject: find files - dos batch
Reply: (edit)
I'll try it on my Windows98 ;) Why run FAT32 on XP ???

Now, seriously. I was thinking on something in the lines of :

dir \*.* /s | findstr "\/" | findstr ":" | findstr -v "<DIR>"

... then to be stuck with date and size conversion to be handled. But you then could query on bytesize (to the byte) and date (to the minute).

Ex.

C:\>dir \*.* /s | findstr "\/" | findstr ":" | findstr -v "<DIR>"
04/02/2003 09:52 0 AUTOEXEC.BAT
17/12/2007 15:18 209 boot_GDISK32_copy.ini
04/02/2003 09:52 0 CONFIG.SYS
04/02/2008 12:20 246.551 IPC.LOG
23/01/2008 09:39 1.167 _Sid.txt
30/04/2007 11:46 39 usrlist.txt
24/04/2007 12:39 58.051 INSTALL.LOG

Hi there.


Report Offensive Follow Up For Removal


Response Number 6
Name: Mechanix2Go
Date: February 4, 2008 at 04:21:17 Pacific
Subject: find files - dos batch
Reply: (edit)
"Why run FAT32 on XP"

So when it breaks [it will] you have a fighting chance of fixing it.

for NT5:

attrib /s c:\*.* | find /i "filename.ext"


=====================================
If at first you don't succeed, you're about average.

M2



Report Offensive Follow Up For Removal

Response Number 7
Name: klint
Date: February 4, 2008 at 07:04:30 Pacific
Subject: find files - dos batch
Reply: (edit)
A quicker way of doing this:

dir \*.* /s | findstr "\/" | findstr ":" | findstr -v "<DIR>"

is:

dir /a-d \*.* /s | findstr "\/" | findstr ":"

But it's very tricky to do queries such as "modified within the last X weeks." Your best bet may be to try and find a utility application somewhere on the net.


Report Offensive Follow Up For Removal

Response Number 8
Name: Mechanix2Go
Date: February 4, 2008 at 07:16:31 Pacific
Subject: find files - dos batch
Reply: (edit)
With DIR you're left guessong about file flags.

That's the reason for using ATTRIB. It shows ALL files.


=====================================
If at first you don't succeed, you're about average.

M2



Report Offensive Follow Up For Removal

Response Number 9
Name: klint
Date: February 4, 2008 at 07:20:16 Pacific
Subject: find files - dos batch
Reply: (edit)
True. I thought the OP also wanted to list the dates & times of each file, hence the DIR.

DIR /A includes hidden and system files, and DIR /A-D excludes directories. I'm not sure if DIR /A still misses any files that are included by ATTRIB /S.


Report Offensive Follow Up For Removal



Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: find files - dos batch

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




CPU and Graphics Upgrade Questions

VIRUS ALERT in Taskbar, HELP!

DSHUB24 Connection Problems

need help with dsl and dial up

novel 3.12


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC