This repository was archived by the owner on Oct 11, 2022. It is now read-only.
forked from nickelsworth/swag
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0089.pas
More file actions
91 lines (83 loc) · 2.13 KB
/
Copy path0089.pas
File metadata and controls
91 lines (83 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{BF-Find v1.1}
{(C) 1995 Brian Leiter}
PROGRAM BFFIND;
USES DOS,CRT;
Var
DirInfo,Path : SearchRec;
S,S1,S2 : String;
Count : LongInt;
L,I : Integer;
Const ProgName = 'BFFIND';
Version = 'v1.1';
Compiled = '12-23-95';
CopyRight = '(C) 1995 Brian Leiter';
Procedure FindFile;
Begin
FindFirst(S1, Archive, DirInfo);
While DosError = 0 Do
Begin
Count:=Count+1;
Writeln(S2,Path.Name,'\',DirInfo.Name);
FindNext(DirInfo);
End;
Exit;
End;
Procedure FindDir;
Begin
FindFirst('*.', Directory, Path);
S2:=S2+'\';
While DosError = 0 Do
Begin
ChDir(Path.Name);
FindFile;
ChDir('\');
FindNext(Path);
End;
Exit;
End;
Procedure Start;
Begin
Count:=0;
Textcolor(15);TextBackGround(4);
Writeln('╒═══════════════════════════════════╕');
Writeln('│ BFFIND v1.1 12-23-95 │');
Writeln('│ │');
Writeln('│ A Search And Find Utility For DOS │');
Writeln('│ │');
Writeln('│ (C) 1995 Brian Leiter *FREEWARE* │');
Writeln('╘═══════════════════════════════════╛');
Textcolor(7);TextBackGround(0);
Writeln('');
S1:=ParamStr(1);
If ParamCount>0 Then
Begin
L:=Length(S1);
For I:=1 To L Do S1[I]:=UpCase(S1[I]);
Writeln('Searching For ',S1);
End;
GetDir(0,S);
If ParamCount=0 Then
Begin
Write('BFFIND What: ');
Readln(S1);
L:=Length(S1);
For I:=1 To L Do S1[I]:=UpCase(S1[I]);
If L=0 Then Halt;
End;
ChDir('\');
GetDir(0,S2);
Delete(S2,3,1);
Exit;
End;
Begin
ClrScr;
Start;
Writeln('');
FindFile;
FindDir;
Chdir(S);
Writeln('');
If Count>1 Then Writeln(S1,' was found ',Count,' times in the directories listed above.');
If Count=1 Then Writeln(S1,' was found 1 time in the directory listed above.');
If Count=0 Then Writeln(S1,' was not found on this drive.');
End.