Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Allright, I know it can be done, with I *think* one command, but I can't seem to find it anywhere. I need to beable to be in root, and do a search for one word and have it look in all files and directories for that word. and no the command I'm thinking of isn't find.
Second thing: Is there any way, without getting any extra programs <clean DOS 6.2 install> to encrypt a file? Any encryption will do, I've been looking for a few days now and all I get is other programs that will do it in DOS
Thank you in advance for and advice/help/comments you guys leave!

"Second thing: Is there any way, without getting any extra programs <clean DOS 6.2 install> to encrypt a file?"
NO. M$-DOS does NOT include file encryption
software.http://blairdude.googlepages.com/p7zip

Something like GREP although there are others, including some GUI DOS apps from PCTools, Norton, etc that can search file contents - there's DOS 'FIND' but it's hardly the best
Most compression programs have the ability to encrypt or password an archive (Zip, ARJ, RAR,... )
Saying that XP is the most stable MS OS is like saying that asparagus is the most articulate vegetable

Yes, I know thoes programs are out there, but the thing is I'm trying to do these two things with a clean MS-DOS install.

Sounds like a snipe hunt - have fun
Saying that XP is the most stable MS OS is like saying that asparagus is the most articulate vegetable

I don't know of any built-in finder except FIND.
You could use a debug script to create grep, then use it. But why would you?
Likewise, you could use debug to encrypt by doing an XOR. Pretty cheesey.
=====================================
If at first you don't succeed, you're about average.M2

hmm ok i was half wrong, it was half the find command just useing it as a filter the command i was looking for was dir C:\ /s /b | find "text" and ya ther is nothign for encryption/compression in dos... im going to try to use back up as I need to fool the above command. if you guys have any other suggestions on folling the command i listed other than compressing the file im more than open to suggestions.

"im going to try to use back up as I need to fool the above command"
huh?
This:
dir C:\ /s /b | find "text"
will not find "text" within files. It will find filenams containging "text" but it will miss hidden files.
If your purpose it to find files, try:
chkdsk c: /v | find "text"
=====================================
If at first you don't succeed, you're about average.M2

k let me rephrase this, and make a new suggestion...
i need to look for one word within a text file. and i dont know the name of the text file so i need to search a certian number of directories for this file that contains the word.
now, i was thinking if there is no command in vanilla DOS 6.2 to do this, might i beable to write a semi-short batch file that can do this, search through directories, <going to be every directory in C:\> and look for files, and then once it finds the files, search for the specified word in thoes files.

It will take 2 BATs:
::== ftxt62.bat ============
@echo off
attrib +a -s -r -h h:\*.txt
attrib h:\*.txt /s > one.bat
one
::==========================::== a.bat ====================
find "distribute" %1
set done=%1
find /v "%done%" < one.bat > #
copy # one.bat > nul
one
::=============================Put in your own drive letter and string to find.
After creating these, run ftxt62
=====================================
If at first you don't succeed, you're about average.M2

Well... almost.
I had forgotten that DOS won't copy a file of zero length.
Here's the revised a.bat:
::== a.bat
find "distribute" %1
find /v "%1" < one.bat > #
type # > one.bat
one
::==
=====================================
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |