English
Includes

CutPath.inc - part way of Dateiname & inverse

 

Michael
Dell
part way of Dateiname & inverse.
CutPath - part way of Dateiname or inverse
Author: Michael Dell -> http://www.cplace.de
support@cplace.de
Def TP(1)               Translate$($(1),/,\)
Def gFileFromPath$(1)   SubStr$(TP($(1)),-1,Chr$(92))                           Filenames
Def gPathFromPath$(1)   SubStr$(TP($(1)),1,gFileFromPath$($(1)))                way with  on the end
Def gExtFromPath$(1)    (. + SubStr$(gFileFromPath$($(1)),-1,.))            Dateierweiterung
Def gFileOEFromPath$(1) SubStr$(gFileFromPath$($(1)),1,gExtFromPath$($(1)))     Filenames without expansion
for Kompatibillität to middle-aged CutPath.pinc Version
Def GetFPath$(1)        gPathFromPath$($(1))                                    way with  on the end
Def GetPath$(1)         Del$(gPathFromPath$($(1)),Len(gPathFromPath$($(1))),1)  way without  on the end
Def GetFileName$(1)     gFileFromPath$($(1))                                    Filenames
Def GetFileExt$(1)      gExtFromPath$($(1))                                     Dateierweiterung
Def GetFileNameOE$(1)   gFileOEFromPath$($(1))                                  Filenames without expansion
**  demonstration- Program  *****************************************************************
Cls
Declare Test$
Test$ = f:\own Files/Test\nochn Test\Test.exe
Print New
Print
Print (gPathFromPath$   =  + gPathFromPath$(Test$))
Print (gFileFromPath$   =  + gFileFromPath$(Test$))
Print (gExtFromPath$    =  + gExtFromPath$(Test$))
Print (gFileOEFromPath$ =  + gFileOEFromPath$(Test$))
Print
Print
Print old
Print
Print (GetFPath$        =  + GetFPath$(Test$))
Print (GetPath$         =  + GetPath$(Test$))
Print (GetFileName$     =  + GetFileName$(Test$))
Print (GetFileExt$      =  + GetFileExt$(Test$))
Print (GetFileNameOE$   =  + GetFileNameOE$(Test$))
WaitInput
End
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
02/16/06  
 




Frank
Abbing
Hi.

not only the must as Separator using go. the / is likewise permitted...
and there's another nice API: GetFileTitle()
 
02/16/06  
 




 
02/18/06  
 



Huch have with Translate incorrect Parameterreihenfolge.

Must it heissen:
proc _filename

    parameters s$
    declare p&
    s$:=translate $(s$,,/)
    p&:=instr(/,s$)

    while p&

        s$:=del$(s$,1,p&)
        p&:=instr(/,s$)

    wend

    return s$

endproc

 
02/19/06  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.501 Views

Untitledvor 0 min.
Wilfried Friebe11/25/16
boh105/28/16
rafl03/23/16
Jochen Roxlau12/27/14
More...

Themeninformationen

this Topic has 3 subscriber:

iF (2x)
Frank Abbing (1x)
Michael Dell (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie