Thema: Delphi Dateiendung prüfen

Einzelnen Beitrag anzeigen

Gehstock

Registriert seit: 28. Jan 2006
Ort: Görlitz / Sachsen
489 Beiträge
 
Delphi 2007 Professional
 
#2

Re: Dateiendung prüfen

  Alt 7. Okt 2007, 00:08
mit


Delphi-Quellcode:
S := ExtractFileExt(ansilowercase(frmmain.OpenTextFileDialog1.FileName));
GetExt(s);

Delphi-Quellcode:
procedure GetExt(s : String);
begin
    if S = '.pasthen SetHigh(0); //Delphi
  if S = '.dprthen SetHigh(0); //Delphi Project
  if S = '.dproithen SetHigh(0); //Delphi Project
  if S = '.bdsproithen SetHigh(0); //Delphi Project
  if S = '.bdsgroupthen SetHigh(0); //Delphi Project group
  if S = '.ppthen SetHigh(0); //Delphi
  if S = '.dpkthen SetHigh(0); //Delphi
  if S = '.dfmthen SetHigh(98); //Delphi Form
  if S = '.dfxthen SetHigh(98); //Delphi Form
  if S = '.txtthen SetHigh(99); //text
  if S = '.basthen SetHigh(5); //VB 6
  if S = '.frmthen SetHigh(5); //VB 6 Form
  if S = '.vbthen SetHigh(5); //VB 2005
  if S = '.cthen SetHigh(2); //C++
  if S = '.cppthen SetHigh(2); //C++
  if S = '.hthen SetHigh(2); //C++
  if S = '.hppthen SetHigh(2); //C++
  if S = '.csthen SetHigh(9); //C#
  if S = '.asmthen SetHigh(8); //ASM
  if S = '.batthen SetHigh(13); //Bat
  if S = '.cmdthen SetHigh(13); //Bat
  if S = '.pythen SetHigh(14); //Python
  if S = '.inithen SetHigh(15); //ini
  if S = '.javathen SetHigh(11); //java
  if S = '.issthen SetHigh(16); //inno
  if S = '.plthen SetHigh(17); //perl
  if S = '.pmthen SetHigh(17); //perl
  if S = '.prlthen SetHigh(17); //perl
  if S = '.cgithen SetHigh(17); //perl
  if S = '.htmthen SetHigh(18); //HTML
  if S = '.htmlthen SetHigh(18); //HTML
  if S = '.phpthen SetHigh(19); //PHP
  if S = '.php3then SetHigh(19); //PHP
  if S = '.phtmlthen SetHigh(19); //PHP
  if S = '.php3then SetHigh(19); //PHP
  if S = '.rbwthen SetHigh(20); //Ruby
  if S = '.rbthen SetHigh(20); //Ruby
  if S = '.cssthen SetHigh(21); //C# Script
  if S = '.xmlthen SetHigh(22); //xml
  if S = '.xsdthen SetHigh(22); //xml
  if S = '.xslthen SetHigh(22); //xml
  if S = '.xsltthen SetHigh(22); //xml
  if S = '.dtdthen SetHigh(22); //xml
end;
Marcel
  Mit Zitat antworten Zitat