Jim,

Here is a REAL OLD program (Turbo Pascal 4.0) that I wrote called "whereis". Any one 
want to maintain it?  Add copyright, pick an open source license, compile, etc.?

*****************Begin Source Next Line*************************
program WhereIs;  {finds where files are located}
                  {also useful for finding duplicate file names}

uses Dos;

{$M 65520,0,655360}
var
  MatchString : string[12];
  Dir : DirStr;
  Name : NameStr;
  Ext : ExtStr;

procedure MatchFiles(SubDirectory:string);
var
  DirInfo : SearchRec;
begin
  FindFirst(SubDirectory+MatchString,AnyFile,DirInfo);
  while DosError=0 do
  begin
    if (DirInfo.Attr and Hidden)=Hidden then
      writeln(SubDirectory+DirInfo.Name,' {hidden}')
    else
      writeln(SubDirectory+DirInfo.Name);
    FindNext(DirInfo);
  end; {while there are more files to match}
  FindFirst(SubDirectory+'*.*',AnyFile,DirInfo);
  while DosError=0 do
  begin
    if (DirInfo.Name<>'.') and (DirInfo.Name<>'..') then
      if (Directory and DirInfo.Attr)<>0 then
        MatchFiles(SubDirectory+DirInfo.Name+'\');
    FindNext(DirInfo);
  end;
end; {MatchFiles}


begin
  if ParamCount=0 then
    begin
      writeln('Usage: WHEREIS [drive:][path]<filename.ext>');
      writeln('  {DOS wildcards are acceptable in the file name}');
      writeln;
      writeln('  <file.ext>             from the present directory down');
      writeln('  \<file.ext>            from the root of the present drive');
      writeln('  d:\dir\dir\<file.ext>  from a specific directory down');
      writeln('                           on a specific drive');
      halt;
    end;
  FSplit(FExpand(ParamStr(1)),Dir,Name,Ext);
  MatchString:=Name+Ext;
  MatchFiles(Dir); {searches from where you are down the tree structure
                    unless you specify the root directory}
end. {Where}
************************End of Source Previous Line*******************************

-----Original Message-----
From: Jim Hall [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 22, 2004 11:06 AM
To: [EMAIL PROTECTED]
Subject: Re: [Freedos-user] File Find Utility To Add To FreeDOS
Distribution


No You! wrote:
> Back in the old DOS days, I used to use a very good file finding program
> named WIZ.
> 
> I just received an email from its author, letting me know he fixed it to
> work with Win XP, as well as a few other things.  Here is his sstatement:
> WIZ now completely supports Windows XP and Windows2000, including
> long filenames, FAT32, and NTFS, and networked shared files.
> 
> I asked if he wouldn't mind it being included in the FreeDOS distributions,
> and he said go for it.
> 
> http://members.core.com/~ramvan/


This seems to be a "closed source" program.  Any chance it could be made 
available under a more open license, such as the GNU GPL or the BSD license?

-jh


-- 
_____________________________________________________________________________
This email message has been automatically encrypted using ROT-26.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Freedos-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-user


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Freedos-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to