Разработка файловой оболочки

Caaa?a
caee??aaony a ?ac?aaioea oaeeiaie iaiei?ee aey iia?aoeiiiie nenoaiu
Windows'95/98. A i?ia?aiia ?aaeeciaaou iaoaieciu eiie?iaaiey, ia?aiina,
oaaeaiey, ia?aeiaiiaaiey oaeeia e ae?aeoi?ee, iiene oaeeia ii ianea, i?iniio?
nienea oaeeia ii ianea, i?iniio? e ?aaaeoe?iaaiea oaeeia ai aiaoieo ?aaaeoi?ao,
i?enaiaiea e iieo?aiea ao?eaooia oaeea, i?enaiaiea ao?eaooia a?oiia oaeeia,
caione i?eei?aiee ni no?ieie ia?aiao?ia, nicaaiea ae?aeoi?ee, ii?aaaeaiea
?acia?a ae?aeoi?ee, iieo?aiea eioi?iaoee i aenea, iano?ieee eioa?oaena
i?ia?aiiu, ii?aaaeaiea noiia?iiai iau?ia aeneiaiai i?ino?ainoaa caieiaaiiai
a?oiiie oaeeia, ainnoaiiaeaiea eioa?oaeniuo ia?aiao?ia i?e iiaoi?iii caionea
i?ia?aiiu. Oae ?a iaania?eou oi?aaeaiea iaiei?eie i?e iiiiue iaieioeyoi?a oeia
"iuou" e eeaaeaoo?u. Aey ?aaeecaoee iinoaaeaiiie
caaa?e iaiaoiaeii nicaaou eioa?oaen iieuciaaoaey ninoiyuee ec oaeeo
eiiiiiaio: A) iaiaeu eino?oiaioia. Aey i?aaiecaoee
eioa?oaena iieuciaaoaey aoaoo eniieuciaaiu noaiaa?oiua aecoaeuiua eiiiiiaiou
Delphi 3.0. Aey ?aaeecaoee iaoaiecia eiie?iaaiey/anoaaee iaiaoiaeii caiiiieou
nienie eiie?oaiuo oaeeia/ae?aeoi?ee, ea?aue yeaiaio nienea aie?ai niaa??aou
eioi?iaoe? i ianoa iaoi?aaiey oaeea/ae?aeoi?ee e eiaie oaeea/ae?aeoi?ee. I?e
eiie?iaaiee a?oiiu oaeeia eee iaiiai oaeea iaiaoiaeii ii?aaaeeou eo ianoi
iiei?aiea a ea?a?oee eaoaeiaia, a caoai caiieieou nienie, auae?ay ana oaeeu
ioia?aiiua iieuciaaoaeai ec nienea oaeeia iieacaiiiai a eioa?oaeniie ?anoe
i?ia?aiiu (nienea oaeeia). I?e eiie?iaaiee ae?aeoi?ee iaiaoiaeii oae?a
ii?aaaeeou a? iiei?aiea e i?iecaanoe neaie?iaaiea naiie ae?aeoi?ee n nio?aiaieai
a nienea ei?i oaeeia niaa??aueony a eiie?oaiie ae?aeoi?ee e no?oeoo?u eaoaeiaia.
Aey anoaaee ae?aeoi?ee a ianoi eiie?iaaiey, iaiaoiaeii ainnicaaou a? no?oeoo?o,
a caoaineiie?iaaou a ia? oaeeu. Aey inouanoaeaiey yoiai i?ioanna auoaoiiiyiooue
nienie ?acaeaaaony ia aaa. A ia?aii nienea (iaciaai aai a?aiaiiue nienie
ae?aeoi?ee) aie?ia iaoiaeouny no?oeoo?a eaoaeiaia, a ai aoi?ii (a?aiaiiii nienea
oaeeia) ?aniiei?aiiua a yoeo eaoaeiaao oaeeu. Aaa nienea iaiaoiaeiu aey
oiaiuoaiey a?aiaie cao?a?aiiiai ia eiie?iaaiea, oae eae i?e iaee?ee iaiiai
nienea iaiaoiaei aiaeec ea?aiai yeaiaioa nienea ia i?aaiao iaee?ey iiaae?aeoi?ee
e nicaaiea yoeo iiaae?aeoi?ee a ianoa eiie?iaaiey, a a eiie?oaiie ae?aeoi?ee a
aieuoeinoaa neo?aaa eiee?anoai ae?aeoi?ee iaiuoa ?ai eiee?anoai oaeeia e a?aiaie
ia i?iaa?eo iiiaaiaeouny aieuoa, ?ai i?e eniieuciaaiee aaoo nieneia. Anee ?a
eniieuciaaou aaa nienea oi aey ainnicaaiey no?oeoo?u eaoaeiaia iaiaoiaeii eeou
ioni?oe?iaaou a?aiaiiue nienie ae?aeoi?ee a niioaaonoaee n ea?a?oeae eaoaeiaia,
e nicaaaaou ae?aeoi?ee i?ioiay ii nieneo naa?oo aiec. Oae eae iinea ni?oe?iaee,
ae?aeoi?ee ?aniiei?aiiua ia aa?oieo o?iaiyo aei?aiiinoe eaoaeiaia aoaoo
iaoiaeouny a aa?oiae ?anoe nienea, a ae?aeoi?ee ?aniiei?aiiua ia ie?ieo o?iaiyo
aoaoo iaoiaeouny a eiioa nienea. Iinea ainnicaaiey no?oeoo?u ae?aeoi?ee inoa?ony
oieuei ia?aienaou oaeeu. Aeai?eoi caiieiaiey a?aiaiiuo nieneia iieacai ia
?enoiea 1 a aeaa aeie noaiu. ?aaeecaoey aaiiiai aeai?eoia aoaao aace?iaaia ia
eniieuciaaiee ooieoee FindFirst e FindNext, yoe ooieoee inouanoaey?o i?iniio?
niaa??eiiai oeacaiiie ae?aeoi?ee e a ea?anoaa ?acoeuoaoa aica?aua?o eiy
iaeaaiiiai yeaiaioa, aai ao?eaoou, a?aiy nicaaiey e ?acia?. I?e aiaeeca
ao?eaooia iaeaaiiiai yeaiaioa ii?ii ii?aaaeeou aaiiue yeaiaio ae?aeoi?ey eee
oaee, e a niioaaonoaee n aiaeecii caienaou aai eiy e iiei?aiea a niioaaonoao?uee
nienie. Ia iienaiiii aeai?eoia aoaao aace?iaai oae?a iaoaieci oaaeaiey
ae?aeoi?ee. Oiiiyiooua auoa ooieoee FindFirst e FindNext aoaoo oae?a i?eiaiaiu
i?e ?aaeecaoee iaoaiecia iienea oaeeia ii ianea. Delphi
3.0 - n?aau aecoaeuiiai i?ia?aiie?iaaiey i?eei?aiee aey Windows'95
. Oaaeaiea ae?aeoi?ee. Iiene oaeeia a i?ia?aiia ?aaeeciaai n eniieuciaaieai ianee. A
ianea aicii?ii eniieuciaaiea neo?aaiiai neiaiea, caiaiu a?oiiu iaecaanoiuo
neiaieia a eiaie oaeea, eee aai ?anoe?aiee "*", a oae?a aicii?ai iiene n
?acee?eai ?aaeno?ia neiaieia, e aac oaeiaiai, n oeacaieai iaeanoe iienea. Oae ?a
nouanoao?o aicii?iinoe iienea n iaei?aieai aiiieieoaeuiuo ia?aie?aiee, oaeeo eae
?acia? eneiiiai oaeea, a oae ?a a?aiaie nicaaiey oaeea. Aaoaeuii n ?aaeecaoeae
auoa ia?a?eneaiiuo iaoaieciia au ii?aoa iciaeiieouny a i?eei?aiee 1 ia no?aieoao
(29-35). Caanu ?a, iu ?anniio?ei ?aaeecaoe? iniiaiie ?anoe yoiai
iaoaiecia. , eee a?oaea aicii?iua aa?eaiou, e iaeanoe
iienea. A ea?anoaa aiiieieoaeuiiai ia?aiao?a ii?ao auou caaaia i?iaa?ea ?aaeno?a
neiaieia. Aeie noaia iienea oaeeia iieacaia ia ?enoiea 1. I?e iienea
eniieucoaony ?aeo?neaiay i?ioaao?a (oaeno 1.) a eioi?ie iineaaiaaoaeuii
i?iniao?eaaaony iaeanou iienea, aee??ay iiaeaoaeiae, n?aaieaaaony eiy iaeaaiiiai
oaee n ianeie iienea, e anee ana iaei?aiiua ia?aie?aiey auiieiaiu, iaeaaiiue
oaee caiineony a nienie i?aaeaaaaiue iieuciaaoae? aey i?iniio?a. Aey i?aaiecaoee
iienea a ?aciuo iaeanoyo eciaiyaony eeou ianoi ia?aiai auciaa ?aeo?neaiie
i?ioaao?u. EndList:boolean;
FindForm.StatusFind.Panels[1].Text:=CurDir; If FindForm.CBAdvSearch.Checked and
(F.Attr<>faDirectory) then // ?acia? e a?aiy nicaaiey iaeaaiiai oaeea aie?iu iaoiaeony a i?aaaeao
caaaiiuo (F.Size >
StrToInt(FindForm.SGreater.Text)))) then Continue; if
not(((FileDateTime(CurDir+F.Name)<FindForm.DateIsBefore.Date) and
(FileDateTime(CurDir+F.Name) > FindForm.DateIsAfter.Date))) then Continue; if (F.Name<>'.') and (F.Name<>'..')
then FindInCurrentDir(CurDir+F.Name+'\'); // anee oaee iiaoiaeo iia
ianeo, caianoe aai a nienie
FindForm.StatusFind.Panels[0].Text:=IntToStr(StrToInt(FindForm.StatusFind.Panels
[0].Text)+1); // auiieiyou iiene iiea
ia caeii?aony oaeeu a oaeouae iaeanoe caaaiiie iaeanoe. A oi?ia iienea oaeeia aicii?ai
ia?aoia e aua?aiiiio oaeeo, ec nienea iaeaaiiuo, a oae?a caione eeai
i?iniio?/?aaaeoe?iaaiea ai aiaoiai ?aaaeoi?a. Iienaiiay auoa ?aaeecaoey aeai?eoia iienea oaeeia i?eiai?ia a
?aaeecaoee eiie?iaaiey e oaaeaiey ae?aeoi?ee. I?e ?aaeecaoee ?anniao?eaaaiuo
i?ioannia iiiaaiaeony iaee?ea aaoo a?aiaiiuo nieneia: nienea ae?aeoi?ee e nienea
oaeeia (ea?aay no?iea iaieo nieneia aee??aao a naay "iieiue ioou" (FULL PATH))
oaeea/ae?aeoi?ee. Aey ?aaeecaoee a?aiaiiuo nieneia eniieuciaai aecoaeuiay
eiiiiiaioa ListBoo, aaiiay eiiiiiaioa i?aanoaaeyao niaie aeiaie?aneee nienie
no?ie e iaai? i?ioaao? e ooieoee aey oi?aaeaiey yoei nieneii. Caiieiaiea yoeo
nieneia inouanoaeyaony i?e iiiiue i?iniio?a ae?aeoi?ee. N eenoeiaii i?ia?aiiu
?aaeeco?uai yoe i?ioannu au ii?aoa iciaeiieouny a i?eei?aiee 1 ia no?aieoao
(17,23-27). Aey eiie?iaaiey/oaaeaiey ae?aeoi?ee ninoaaey?ony iaa auoaoiiiyioouo
nienea. I?e anoaaea ae?aeoi?ee nicaa?ony iieiia aa?aai ae?aeoi?ee, a caoai
i?ienoiaeo eiie?iaaiea oaeeia. I?e oaaeaiee ae?aeoi?ee oae ?a ninoaaey?ony iaa
nienea, ii oae eae noaiaa?oiie i?ioaao?u oaaey?uae ia ionoo? ae?aeoi?e? iao, oi
a ia?aea oaaey?ony ana oaeeu a oaaeyaiie ae?aeoi?ee (aee??ay oaeeu iaoiayueany a
iiaae?aeoi?eyo), a caoai ionoua ae?aeoi?ee. I?ia?aiia
eiaao ana iaiaoiaeiua ooieoee ?aaiou n oaeeaie. Ana ooieoee ii?ii aeoeaece?iaaou
ia?aoeai eiiaeiaoee eeaaeo. I?iecaiaeouny noaoenoeea eiie?iaaiey, ia?aiina,
oaaeaiey oaeeia/ae?aeoi?ee a oaiaiie aey aini?eyoey iieuciaaoaeai oi?ia.
Nouanoaoao i?inoie iaoaieci iaei?aiey oeeuo?a ia iieacuaaaiua oaeeu. I?e
eciaiaiee eioa?oaena i?ia?aiiu, ana eciaiaiey nio?aiy?ony e aoaoo ainnoaiiaeaiu
i?e neaao?uai caionea. Caione i?eei?aiee ni no?ieie ia?aiao?ia n oeacaieai oeia
caionea. Auaia niiauaiey i eiee?anoaa iiaae?aeoi?ee a ae?aeoi?ee e i eiee?anoaa
oaeeia ?aniiei?aiiuo a iae. Ii?aaaeaiea ?acia?a ae?aeoi?ee i?enaiaiea ao?eaooia
a?oiia oaeeia i?inoui ia?aoeai aaoo eeaaeo. A i?ia?aiia
?aaeeciaaiu neaao?uea iaoaieciu: iiene oaeeia ii ianea,
caione i?eei?aiee ni no?ieie ia?aiao?ia, iieo?aiea
eioi?iaoee i aenea, ii?aaaeaiea noiia?iiai iau?ia aeneiaiai i?ino?ainoaa caieiaaiiai
a?oiiie oaeeia, I?ia?aiia eiaao oaiaiue eioa?oaen e ii?ao
eniieuciaaouny aey ?aaiou iieuciaaoaeyie n ?aciui o?iaiai ciaiee. Aeaaiay oi?ia i?ia?aiiu unit UMainForm; // aeaaiay oi?ia
i?ia?aiiu
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, TMainForm = class(TForm) Options1: TMenuItem;
DirectoryMenu: TPopupMenu; Rename1:
TMenuItem; PasteDir: TMenuItem; FileMask1: TMenuItem;
FileAttr: TMenuItem; Bevel1: TBevel; SCopy: TSpeedButton;
Copy1: TMenuItem; InvertSelect: TMenuItem;
procedure FormCreate(Sender: TObject);
Section: THeaderSection); procedure
NewDirClick(Sender: TObject); procedure CutClick(Sender: TObject); procedure DeleteDirClick(Sender: TObject);
procedure FileMask1Click(Sender: TObject); procedure
Find1Click(Sender: TObject); procedure RenameDirClick(Sender:
TObject); procedure SizeDirectory1Click(Sender:
TObject); procedure FileListKeyPress(Sender:
TObject; var Key: Char); procedure PasteDirClick(Sender: TObject); procedure OpenClick(Sender: TObject);
procedure SCutClick(Sender: TObject); procedure
SCopyClick(Sender: TObject); procedure Cut1Click(Sender:
TObject); procedure Delete1Click(Sender: TObject); procedure InvertSelectClick(Sender: TObject);
procedure SelectallClick(Sender: TObject); // iiaee??aaiua iiaoee (ia
noaiaa?oiua) URenameForm, UAskDeleteForm, UGetFileMask, FmxUtils,
UFindForm, UInfoForm, procedure
TMainForm.About1Click(Sender: TObject); procedure
TMainForm.Exit1Click(Sender: TObject); If
Application.MessageBox('Exit
?','Exit',MB_APPLMODAL+MB_ICONQuestion+MB_YESNO)=IDYes then begin //Onoaiiaeaia?euiuo ia?aiao?ia aey eiiiiiaio aeaaiie
oi?iu //Auaia oi?iu ia?aiao?ia OptionsForm.ShowModal; // Niaia oaeouaai aenea
MainForm.Directory.BuildTree; Shift:
TShiftState; X, Y: Integer); procedure
TMainForm.NewDirClick(Sender: TObject); Function
CountDir(Str:String):String;
findfirst(Str+'\*.*',faAnyFile,F); if
(f.Attr>=16) and (f.attr<32) and (f.Name<>'.') and
(f.Name<>'..') then procedure
TMainForm.DirectoryChange(Sender: TObject); //Caiieiaiea noaoon-no?iee
MainForm.StatusBar.Panels[0].Text:=CountDir(Directory.Directory)+' dir. &
'+IntToStr(MainForm.FileList.Items.Count)+ If
UpperCase(MainForm.Directory.Directory)=UpperCase(MainForm.DrBox.Drive+':\')
then else
FlagMoveFile:=False;
FlagMoveFile:=True;
PasteFileFromTemp; procedure
TMainForm.Rename1Click(Sender: TObject);
RenameFileForm.ShowModal; // Iaioeaiea a?aiaiiuo nieneia //Iaiiaeaiea nienea
ae?aeoi?ee begin //Ii?aaaeaiea aeaeiuo no?ie a eiioaeoniii iai? oaeeiaie
iaeanoe begin else
Rename1.Enabled:=True;
Paste.Enabled:=True; // Cai?in ianee oaeeia aey nienea oaeeia (a aaeuiaeoai
NO) // Caione
i?ia?aii/?aaaeoe?iaaiea(i?iniio?) ai aiaoiai ?aaaeoi?a
ExecuteFile(Str,'','',SW_SHOW); //Ia?aiauaiea ?acaaeeoaey NO e
Nienea ae?aeoi?ee (A Aaeuiaeoai NA) // Oe?eia NA ia aie?ia auou iaiuoa Nienea aeneia (A aaeuiaeoai
NIA) // Nio?aiaiea iiei?aiey ?acaaeeoaey
aey neaao?uaai caionea i?ia?aiiu //
Onoaiiaea ?acia?ia iaiaeae noaoon-no?iee proced
ure TMainForm.Find1Click(Sender: TObject); //
Auaia eioi?iaoee i oaeouai aenea e ae?aeoi?ee procedure
TMainForm.CopyDirClick(Sender: TObject);
DoingWithDir:=True; //Ia?aeiaiiaaiea ae?aeoi?ee a
niioaaonoao?uae oi?ia procedure TMainForm.FileAttrClick(Sender:
TObject); AttrFileForm.ShowModal; // a iiiaio aai ioe?uoey begin if
UpperCase(MainForm.Directory.Directory)=UpperCase(MainForm.DrBox.Drive+':\')
then Procedure
DDD(DirS:string); FindFirst(DirS+'\'+'*.*',faAnyFile,D); if (D.Attr=faDirectory) Or (D.Attr=18) then Until(FindNext(D) <> 0); // Auaia eioi?iaoee i oaeouae ae?aeoi?ee a noaoon-no?iea
MainForm.StatusBar.Panels[0].Text:=FormatSize(IntToStr(Size)); // ia?aaia ?enea
a ?eoaaaeuiue oi?iao procedure TMainForm.FileListMouseUp(Sender: TObject; Button:
TMouseButton; str:string; for i:=0 to MainForm.FileList.Items.Count-1 do Size:=Size+F.Size; // Anee iaei
auaaeaiiue oaee, auaanoe eioi?iaoe? i iai a no?iea noaoona
MainForm.StatusBar.Panels[1].Text:=ExtractFileName(F.Name)+' '+ end ' in
'+IntToStr(MainForm.FileList.SelCount)+ ' selected files'; For i:=0 to MainForm.FileList.Items.Count-1 do // Auaaeeou ana oaeeu a NO if MainForm.FileList.SelCount=MainForm.FileList.Items.Count then MainForm.FileList.Selected[i]:=True; if MainForm.FileList.Selected[i] then if
MainForm.FileList.SelCount=1 then break;
MainForm.StatusBar.Panels[1].Text:=ExtractFileName(F.Name)+' '+ end ' in
'+IntToStr(MainForm.FileList.SelCount)+ ' selected files'; begin Shift:
TShiftState); // anee ia?ao ENTER caionoeou oaee Size:=0;
FindFirst(MainForm.FileList.Items[i],faAnyFile,F); if MainForm.FileList.SelCount=1 then
FormatSize(IntToStr(F.Size))+' b'+' '+
MainForm.StatusBar.Panels[1].Text:=FormatSize(intToStr(Size))+' b'+ procedure TMainForm.PasteDirClick(Sender: TObject);
PasteDirectory(SourseDir,MainForm.Directory.Directory); begin begin If
Length(MainForm.Directory.Directory) <= 3 then RenameDir.Enabled:=False; RenameDir.Enabled:=True; //Ii?aaaeaiea yaeyaony ee auaaeaiiue oaee i?eei?aieai e
iianaa?eaaiea / ne?uoea if
(UpperCase(ExtractFileExt(MainForm.FileList.FileName))='.EXE') or else Open.Enabled:=False; GetFormToCenter(RunForm); //Niaia oaeouaai aenea e iaiineaiea NO e NA
MainForm.FileList.Directory:=MainForm.DrBox.Drive+':\';
FindFirst(MainForm.DrBox.Drive+':\*.*',faDirectory,F); Until
((FindNext(F)<>0) or ((F.Attr=faDirectory) and ((F.Name<>'.') or
(F.Name<>'..'))));
MainForm.Directory.SetDirectory(MainForm.DrBox.Drive+':\'+F.Name);
MainForm.FileList.Enabled:=True; '
files '; i:integer; if Str[i]='\' then end; //Anee
aeoeaai NO oi au?accaou oaeeu //Anee aeoeaai NA oi
au?acaou ae?aeoi?e?
MainForm.CMDirList.Items.Add(MainForm.Directory.Directory); procedure TMainForm.SPasteClick(Sender: TObject); // Ii?aaaeeou (ii caiieiaie?
a?aiaiiuo nieneia) ?oi iaiaoiaeii anoaaeou PasteFileFromTemp;
DestinationDir:=MainForm.Directory.Directory; If not DoingWithDir then end; if (MainForm.FileList.Focused) and
(MainForm.FileList.SelCount>0) then
IndexDeleteDirectory:=MainForm.Directory.SelectedItem;
MainForm.Directory.Invalidate; begin
CopyMoveDirectory; CopyPathFileInTemp; MainForm.SCopy.Enabled:=True; // Au?acaiea Ae?aeoi?ee
MainForm.CMDirList.Items.Add(MainForm.Directory.Directory); procedure
TMainForm.Cut1Click(Sender: TObject);
FlagMoveFile:=True;
SourseDir:=MainForm.Directory.Directory;
GreateCopyMoveDirList(MainForm.Directory.Directory); begin CopyMoveDirectory; CopyPathFileInTemp; begin ProgressForm.Close;
DestinationDir:=MainForm.Directory.Directory; If not DoingWithDir then end; if (MainForm.FileList.Focused) and
(MainForm.FileList.SelCount>0) then
IndexDeleteDirectory:=MainForm.Directory.SelectedItem;
MainForm.Directory.Invalidate; // Ia?aeiaiiaaiea a caaeneiinoe io
eiioaenoa RenameDirForm.ShowModal; procedure TMainForm.FormResize(Sender: TObject); MainForm.Width:=391; procedure
MainForm.InvertSelectClick(Sender: TObject); Shift: TShiftState); // Iaiiaeaiea
noaoon-no?iee if MainForm.FileList.Selected[i]
then if MainForm.FileList.SelCount=1 then break;
MainForm.StatusBar.Panels[1].Text:=ExtractFileName(F.Name)+' '+ end ' in
'+IntToStr(MainForm.FileList.SelCount)+ ' selected files';
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, FL1='1 column'; FlagMoveFile:Boolean; Procedure SetUpMainForm; Procedure WriteIniOptions;
AllDeleteFlag,DeleteFlag:boolean; Function
CreateStringForTemp(i:integer):string; Procedure
DeleteEmptyDirectory(Dir:string); DirSourse:string; Uses UMainForm, UOptionsForm,
FMXUtils, UAskDeleteForm, UAskDeleteCurrentFile, MainForm.CMDirList.Clear; //Nicaaiea
a?aiaiiuo nieneia //?aeo?neaiay
i?ioaao?a nicaaiey nieneia aey eiie?iaaiey/ia?aiina/oaaeaiey ae?aeoi?ee if (D.Name<>'.') and (D.Name<>'..')
then
GreateCopyMoveDirList(DirS+'\'+D.Name);
Until(FindNext(D) <> 0); // I?iaa?ea nouanoaiaaiey oaeeia e
ia?acaienu aai ii ?aeaie? iieuciaaoaey i?e anoaaea
FilePaste:=ExtractFileName(Str); if FilePaste=FileInDir
then // Iaeaai oaee , cai?in ia aai ia?acaienu
MainForm.TempCopyMove.Items[x]:=MainForm.TempCopyMove.Items[x]+'*';//.Delete(x);
Procedure DeleteEmptyDirectory(Dir:String);
MainForm.Directory.Directory:=(MainForm.Directory.Drive+':\');
FDeleteDir.LDir.Caption:=Dir; begin Else MainForm.Directory.Delete(i); end; Var
Size:=Size+GetFileSize(List.Items[i]);
StrPaste:string; If
MainForm.Directory.Directory[Length(MainForm.Directory.Directory)]<>'\'
then StrPaste:=MainForm.Directory.Directory; For i:=0 to
MainForm.TempCopyMove.Items.Count-1 do begin If FlagMoveFile then else If
Str[Length(str)]='*' then
MainForm.FileList.Update; Function CreateStringForTemp(i:integer):string; If Str[Length(Str)]<>'\' then Procedure
CopyPathFileInTemp;
MainForm.TempCopyMove.Clear;
ColFilesIn_TempCopyMove:=ColFilesIn_TempCopyMove+1;
MainForm.FileList.Items[i]:=''; end; with OptionsForm do
CStatusBar.Checked:=MCIni.ReadBool('Options','StatusBar',True); 1 : LFileList.Caption:=FL1; Procedure
WriteIniOptions; WriteBool('Options','AskOnExit',OptionsForm.AskOnExit.Checked); 1 :
WriteInteger('Options','FileListColumns',1); end; //case if OptionsForm.AskOnExit.Checked then AskExit:=True else MainForm.StatusBar.Visible:=False; MainForm.FileList.Update; MainForm.FileList.Update; MainForm.FileList.Update;
MCIni:=TIniFile.Create('MC.Ini');
Top:=MCIni.ReadInteger('ASWindow','Top',100);
Width:=MCIni.ReadInteger('ASWindow','Width',100); begin
MCIni.WriteInteger('ASWindow','Left',MainForm.Left);
MCIni.WriteInteger('ASWindow','Height',MainForm.Height); end;
Form.Top:=FloatToInt(MainForm.Top+MainForm.Height/2-Form.Height/2); Function FormatSize(S:String):String; Tmp,Temp:String; begin for i:=Length(Temp) downto
1 do
StdCtrls, Buttons; DestinationDir:String; Procedure
DelNotEmptyDirectory(Dir:String); Procedure
SortCMDirList; FMXUtils,UProgressForm; Max:integer; //Oaaeaiea oaeeia ec anao
iiaae?aeoi?ee
FDeleteDir.Label1.Visible:=False; //Ni?oe?iaea a?aiaiiiai nienea ae?aeoi?ee ii aica?anoaie? begin FDeleteDir.LDir.Caption:='Directory
'+MainForm.CMDirList.Items[i]+' is now deleting'; MainForm.CMDirList.Items.Clear; Function
DesideSlash(str:string):integer; if
str[r]='\' then d:=d+1; Var i:integer; if
MainForm.CMDirList.Items.Count=0 then Flag:=true; begin if
DesideSlash(StrL)>DesideSlash(StrH) then For i:=0 to MainForm.CMDirList.Items.Count-2 do begin Procedure
CreateOneDirInDes(d,s,str:string); begin if
D[Length(D)]='\' then Point:=Point+1;
MainForm.Directory.SetDirectory(D); //Nicaaiea aa?aaa
ae?aeoi?ee i?e eiie?iaaiee /ia?aiina MainForm.StatusBar.Panels[1].Text:='Build
destination Tree, Please Wait....'; CreateOneDirInDes(D,S,str); i:integer;
size:=size+GetFileSize(MainForm.CMFileList.Items[i]); For i:=0 to Length(s) do
d:=d+f[i]; CreateDestinPathForFile:=d; i:integer;
ProgressForm.Show; begin If not DoingWithDir then ProgressForm.Close; Var PasteFileInDest(Sdir,DDir); Application.MessageBox('Not Free
Spase','Error',MB_APPLMODAL+MB_OK); //Oaaeaiea iaiiai oaeea end else
AskDeleteCurrentFile.FileName.Caption:=AskDeleteCurrentFile.FileName.Caption+'
is Read Only'; end; interface ComCtrls, Tabnotbk,
StdCtrls, Buttons, Menus, ExtCtrls; Table:
TTabbedNotebook; RBCurDir: TRadioButton; ExitSearch: TButton; Label4:
TLabel; Run1: TMenuItem;
procedure FormActivate(Sender: TObject); procedure
RBCurDirClick(Sender: TObject); procedure
ExitSearchClick(Sender: TObject); procedure
Run1Click(Sender: TObject); procedure B1Click(Sender: TObject); private TRec = record FileMaskToFind:array[1..10] of
string; Procedure FindFile; uses
UMainForm,FmxUtils; //N?aaiaiea eiaie e ?anoe?aiey
i?a?aaiiai oaeea n ianeie
Mask:=FindForm.CBFindMask.Text;
FR:=ExtractFileExt(FileName); For i:=1 to
Length(Mask) do //ia?aei io?aiee n ?anoe?aieai if (MaskR[2]='*') and (FR<>'') then
if (MaskR[j]=FR[i]) and (MaskR[j]<>'*') then else for i:=1 to EndFor do begin end; tmp:=False; if MaskR[i]=FR[i] then //a?iaa eiiao n io?aieyie ii ?anoe?aie? else EndFor:=Length(FN); if (MaskN[j]=FN[i]) and (MaskN[j]<>'*') then end j:=0; r:=True; end; tmp:=False; for i:=0 to Length(MaskN) do CompareFileWithMask:=R; //Iiene a
oaeouae ae?aeoi?ee if Dir[Length(Dir)]<>'\' then If FindForm.RBCurDrive.Checked then FindForm.FindInCurrentDir(Dir); //?aeo?neaiay I?ioaao?a iienea a
oaeouae ae?aeoi?ee e iiaae?aeoi?eyo
FindForm.StatusFind.Panels[1].Text:=CurDir; // anoaaeou
ASIiaue eia aey i?a?uaaiey ii eeaaeoa ESC if not(((F.Size <
StrToInt(FindForm.SLess.Text)) and (F.Size >
StrToInt(FindForm.SGreater.Text)))) then Continue; if
not(((FileDateTime(CurDir+F.Name)<FindForm.DateIsBefore.Date) and
(FileDateTime(CurDir+F.Name) > FindForm.DateIsAfter.Date))) then Continue; FindInCurrentDir(CurDir+F.Name+'\');
FindForm.FileWasFind.Items.Add(CurDir+F.Name); FindForm.FileWasFind.Refresh; Procedure
FindInAllDr; begin end; if
FindForm.RBCurDir.Checked then begin
if FindForm.RBAllDrives.Checked then
FindForm.LCurDir.Caption:=FindForm.LCurDir.Caption+UpperCase(MainForm.DrBox.Item
s.Strings[i][1])+':\ ' //I?iaa?ea ianee iienea aey aaeuiaeoaai caianaiey a nienie
ianie for i:=1 to
10 do
FindForm.CBFindMask.Text:=tempStr; i:integer;
if FindForm.CBFindMask.Items[i]<>FindForm.CBFindMask.Text then FileMaskToFind[i]:=FileMaskToFind[i-1]; //Onoaiiaea ia?aeuiuo cia?aiee aey
aec. eiiiiiaio oi?iu iienea
CBFindMask.Text:='*.*'; SGreater.Text:='';
FindForm.StatusFind.Panels[0].Text:='0'; //Ia?aou iiene oaeeia
FindForm.FileWasFind.Sorted:=False;
FindForm.StatusFind.Panels[1].Text:=''; procedure TFindForm.RBCurDirClick(Sender:
TObject); end; procedure
TFindForm.ExitSearchClick(Sender: TObject); if CBAdvSearch.Checked then procedure
TFindForm.MenuPopup(Sender: TObject); If FindForm.FileWasFind.Selected[i]
then
FindForm...n1.Enabled:=False; //Caione
oaeea ec oi?iu iienea if FindForm.FileWasFind.Selected[i]
then Procedure GoToFile; begin
FileName:=ExtractFileName(FindForm.FileWasFind.Items[i]); if Dir[j]='\' then MainForm.Directory.Expand(1); for j:=0 to MainForm.FileList.Items.Count-1 do MainForm.FileList.Refresh; begin procedure TFindForm.B1Click(Sender: TObject); if FileWasFind.SelCount<=0 then B2.Enabled:=True;
Timer1.Enabled:=False; FmxUtils; //Eciai?iiue
noaiaa?oiue iiaoeu
EInvalidDest = class(EStreamError); procedure MoveFile(const FileName, DestName: string); function FileDateTime(const
FileName: string): TDateTime; function ExecuteFile(const FileName, Params, DefaultDir:
string; uses Forms, ShellAPI, UProgressForm,
UMainForm_, UNotTrivial,UMainForm; procedure
CopyFile(const FileName, DestName: TFileName); BytesCopied: Longint; ChunkSize:
Longint = 8192; { copy in 8K chunks } if
HasAttr(Destination, faDirectory) then { if destination is a directory... } GetMem(CopyBuffer, ChunkSize); { allocate the buffer } if Source < 0
then raise EFOpenError.CreateFmt(SFOpenError, [FileName]); if Dest
< 0 then raise EFCreateError.CreateFmt(SFCreateError, [Destination]); {}
SizeAllCopy:=GetSizeAllFiles(MainForm.TempCopyMove); {}
FileSizeProgress:=GetFileSize(FileName); {}
ProgressForm.LFileSize.Caption:=FormatSize(IntToStr(GetFileSize(FileName))); BytesCopied := FileRead(Source, CopyBuffer^,
ChunkSize); { read chunk } {}
ReadByteFile:=ReadByteFile+ChunkSize; {}
ProgressForm.ProgresCopy.Progress:=FloatToInt(((100*ReadByteFile)/(FileSizeProgr
ess+1))); FileWrite(Dest, CopyBuffer^, BytesCopied); { ...write chunk }
until BytesCopied < ChunkSize; { until we run out of chunks } {}
ProgressForm.Ready.Caption:=FormatSize(FloatToStr(AllReadByteFile)); {} ProgressForm.ProgresCopy.Progress:=100;
FileClose(Source); { close the source file } { MoveFile procedure } Tries to just rename the
file. If that fails, try to copy the file and be
deleted/moved. Destination :=
ExpandFileName(DestName); { expand the destination path }
CopyFile(FileName, Destination); { copy it over to destination...}
Returns the size of the named file without opening the file. If the file SearchRec: TSearchRec; else Result := -1; Result :=
FileDateToDateTime(FileAge(FileName)); Result :=
(FileGetAttr(FileName) and Attr) = Attr;
zFileName, zParams, zDir: array[0..79] of Char; StrPCopy(zFileName, FileName),
StrPCopy(zParams, Params),
I?ia?aiia i?aaiacia?aia aey oi?aaeaiey oaeeiaie nenoaiie iia?aoeiiiie nenoaiu
Windows'95/'98, a i?ia?aiia i?aaoniio?aiu neaao?uea aicii?iinoe: ?anoe?aiiue iiene oaeeia ii ianea; Nicaaiea ae?aeoi?ee; Iieo?aiea
eioi?iaoee i oaeouai aenea; Onoaiiaea eioa?oaeniuo ia?aiao?ia
i?ia?aiiu. Aeaaiia iai? i?ia?aiiu; niaa??eo n naaa o?e eiiiiiaiou oi?aaeaiey i?ia?aiiie: Eiiiiiaioa File niaa??eo a naaa iniiaiua ooieoee oi?aaeaiey
oaeeaie e ae?aeoi?eyie (ni. ?en. 1). Ooieoey caionea i?ia?aii Run ainooiia
oieuei oiaaa, eiaaa auaaeaiiue oaee yaeyaony eniieiyaiie i?ia?aiiie. I?e auai?a
aaiiiai ioieoa. Iiyaeyaony oi?ia, niaa??auay no?ieo ia?aiao?ia, a oae?a ia?aiao?
caionea – aea oi?iu ieia caionea (ni. ?en. 2). ?en 2. Oi?ia caionea oaeeia ni no?ieie ia?aiao?ia. Ooieoee Cut,
Copy, Paste, Delete (Au?acaou, Eiie?iaaou, Anoaaeou, Oaaeeou) – noaiaa?oiua
ooieoee oi?aaeaiey oaeeaie/ae?aeoi?eyie. I?e iaaicii?iinoe auiieiaiey auoa
ia?a?eneaiiuo aaenoaee, aaiiua ooieoee iaainooiiu. Ooieoey Rename
(Ia?aeiaiiaaou) cai?aoeaaao o iieuciaaoaey iiaia eiy aey oaeea / ae?aeoi?ee a
oi?ia iieacaiiie ia ?enoiea 3. Ooieoey Delete (Oaaeaiey), oaaeyao
auaaeaiiua yeaiaiou a caaeneiinoe io aeoeaiie ?aai?ae iaeanoe. Anee iineaaiaa,
ia?aa auciaii yoie ooieoee, auaaeaiea i?iecaiaeeinu a iaeanoe oaeeia, oi aoaoo
oaaeaiu auaaeaiiua oaeeu, anee ?a aeoeaiay iaeanou ae?aeoi?ee oi oaaeaia aoaao
ae?aeoi?ey. Ooieoey Find (Iaeoe) iaania?eaaao ?anoe?aiiue iiene oaeeia ii
ianea a iaeanoe iienea oeacaiiie iieuciaaoaeai. Ia?aiao?u e ianea iienea
caaaaony a oi?ia iieacaiiie ia ?enoiea 4 Ia?aiao?aie iienea yaey?ony caaaiea iaeanoe iienea, aicii?iu o?e
iaeanoe: oaeouay ae?aeoi?ey, oaeouee aene e ana ?anoeea aenee (aee??ay
iiaee???iiua naoaaua aenee). Oae?a anou aicii?iinou ?anoe?aiiiai iienea n
oeacaieai ia?aie?aiee a aaoa nicaaiey oaeea nicaaiey e aai i?aaiieaaaaiuo
?acia?ao. Ai a?aiy iienea a no?iea noaoona oi?iu io?a?aaony eiee?anoai iaeaaiiuo
oaeeia, ae?aeoi?ey a eioi?ie inouanoaeyaony iiene. Iinea oiai eae auee iaeaaiu
oaeeu, aicii?ai aica?ao a aeaaio? oi?io i?ia?aiiu e ia?aoia e ianoo iiei?aiey
aua?aiiiai oaeea, a oae?a caione eioa?ano?uaai oaeea (?aaaeoe?iaaiea ai aiaoiai
?aaaeoi?a, anee aua?aiiue oaee ia yaeyaony i?eei?aieai). Aey oaianoaa caaaiey
ianee iienea i?aaoniio?aii o?aiaiea 10-e iineaaieo ianie a ioe?uaa?uainy
nienea. Eiiiiiaioa View niaa??eo a
naaa ooieoee oeeuo?a, iieo?aiey eioi?iaoee i aenea, iieo?aiea e onoaiiaea
ao?eaooia oaeea, iieo?aiea ?acia?a oaeouae ae?aeoi?ee, auaaeaiey anao oaeeia
iaoiayueony a oaeouae ae?aeoi?ee e eiaa?niia auaaeaiea oaeeia. Ooieoey File
Mask (Ianea oeeuo?a) cai?aoeaaao o iieuciaaoaey a oi?ia Get File Mask ianeo aey
ioia?a?aiey oaeeia. Aey ioiaiu ianee iaiaoiaei iiaoi?iue aucia ooieoee e caaaiea
ianee i?aaeaaaaiie ii oiie?aie?. Ooieoey Info (Eioi?iaoey) i?aainoaaeyao
iieuciaaoae? eioi?iaoe? i oaeouai aenea (iau?i naiaiaiiai e caiyoiai
i?ino?ainoaa), a oae?a eioi?iaoe? i oaeouae ae?aeoi?ee. Ooieoey File
Attributes (Ao?eaoou oaeea) aaao aicii?iinou i?iniio?a oaeoueo ao?eaooia oaeea e
eciaiaiey yoeo ao?eaooia. A neo?aa ianeieueeo oaeeia aicii?ii a?oiiiaia
i?enaiaiea iiauo ao?eaooia. Ooieoey Select
All auaaeyao ana oaeeu, iaoiayueany a aaiiie ae?aeoi?ee. Ooieoey Invert Select
eiaa?oe?oao auaaeaiea oaeeia. N oaeeia eioi?ua auee auaaeaiu, auaaeaiea
nieiaaony, a inoaeuiua oaeeu auaaey?ony. ii?ao onoaiiaeou ia?aiao?u eioa?oaena
i?ia?aiiu. Ia?aiao?u – iaee?ea noaoon no?iee, eiee?anoai eieiiie a nienea
oaeeia (io 1 ai 3), cai?aoeaaou iiaoaa??aaiea i?e auoiaa ec i?ia?aiiu. Oae ?a
nouanoaoao iaoaieci onoaiiaee cia?aiey ia?aiao?ia ii oiie?aie? (Cai?aoeaaou
iiaoaa??aaiea i?e auoiaa, Iaee?ea noaoon no?iee, 1 eieiiea a nienea
oaeeia). niaa??eo a naaa iaeioi?ua ec ooieoee
?aniiei?aiiuo a aeaaiii iai?, a oae?a eiiiea ia?aoiaa ia iaei o?iaaiu aaa?o a
nienea ae?aeoi?ee e nienie aeneia (aee??ay naoaaua aenee iiaee??aiiua
iia?aoeiiiie nenoaiie ai caionea i?ia?aiiu). Aiaoiee aea iaiaee eino?oiaioia
iieacai ia ?enoiea 6. Nienie Oaeeia ,
i?aaiacia?ai aey i?iniio?a nienea oaeeia ?aniiei?aiiuo a oaeouae ae?aeoi?ee. I?e
ia?aoee i?aaie eiiiee iuoe aucuaaaony eiioaenoiia iai?, a eioi?ii eia?ony
ooieoee eiie?iaaiey, oaaeaiey, ia?aeiaiiaaiey, anoaaee. Oae?a o nienea oaeeia
nouanoaoao noaoon-no?iea a eioi?ie auaiaeony eioi?iaoey i ioia?aiiii oaeea (eiy,
?acia?, aaoo e a?aiy nicaaiey). A neo?aa a?oiiu ioia?aiiuo oaeeia noaoon–no?iea
iieacuaaao eaeie noiia?iue iau?i aaeo caieia?o ioia?aiiua oaeeu ia aenea.
i?aaiacia?ai aey i?iniio?a ae?aeoi?ee iaoiayueony ia
oaeouai aenea. Nienie eiaao aaaaiaeaio? no?oeoo?o ei?iai eioi?ie yaeyaouny
oaeouee aene. I?e ia?aoee i?aaie eiiiee iuoe iiyaeyouny eiioaeoniia iai? a
eioi?ii ia?a?eneaiu ooieoee ?aaiou n ae?aeoi?eyie. Eae oiiieiaeinu auoa i?ia?aiia eiaao iaai? ooieoee ?aaiou n
oaeeaie. Iaeioi?ua o?aao?uea ii?aaae?iiie iineaaiaauoaeuiinoe aaenoaee aoaoo
?anniio?aiu a aaiiii ?acaaea. Aey eiie?iaaiey oaeeia
/ ae?aeoi?ee (a aaeuiaeoai aoaai aiai?eou oieuei i oaeeao, oae eae i?ioannu
eaaioe?iu) iaiaoiaeii auiieieou neaao?uo? iineaaiaaoaeuiinou
aaenoaee: Nouanoao?o ianeieuei
niiniaia auaaeaiey a?oiiu oaeeia, (oa eoi oi?ioi ciaeii a iia?aoeiiiie nenoaiie
Windows'95 yoio ?acaae, eae e ana iineaao?uea iiaoo i?iionoeou) auaaeaiea iuoeie
n i?eiaiaieai eeaaeo Ctrl e Shift, eeaaeoa Ctrl i?aaiacia?aia aey auaaeaiey a
a?oiio oaeeia ioaaeuii noiyueo a nienea, a eeaaeoa Shift i?aaiacia?aia aey
auaaeaiey "io ia?aeuiiai oaeea, ai eiia?iiai". Aua?aou ianoi
iacia?aiey eiie?iaaiey e auiieieou ooieoe? anoaaeou. Oaaeaiea oaeeia
i?ienoiaeo i?e iiiiue auciaa ooieoee oaaeaiey ec e?aie ?anoe eioa?oaena. Iinea
auciaa, (oaaeeou ae?aeoi?e?) a neo?aa anee ae?aeoi?ey ia ionoa, aoaao cai?ioaii
iioaa???aiea ia oaaeaiea, (oaee(u)) aoaao cai?ioaii iioaa??aaiea oaaeaiey e
i?eaaa?i nienie oaaeyaiuo oaeeia, anee oaaeyaiue oaee eiaao ao?eaoou ReadOnly
(oieuei aey ?oaiey) oae?a aoaao cai?ioaii
iiaoaa??aaiea.