Italia
Fonte/ Codesnippets

File Datum Erstellt Filetimetolocalfiletime Geschrieben Getfileattributesex Zeit Zugriff

 
Unbekannt (14.10.2011)
KompilierenMarkierenSeparieren
DEF GetFileAttributesEx(3) ! "Kernel32","GetFileAttributesExA"
DEF FileTimeToLocalFileTime(2) !"Kernel32","FileTimeToLocalFileTime"
DEF FileTimeToSystemTime(2) !"Kernel32","FileTimeToSystemTime"

Proc Getweekday

    Parameters day&
    Return substr$("Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag",day& + 1,",")

endproc

proc GetAttribString

    parameters attrib&
    return if(testbit(attrib&,4),"<DIR> ","") \
    + if(testbit(attrib&,0),"r","-")     \
    + if(testbit(attrib&,5),"a","-")     \
    + if(testbit(attrib&,1),"h","-")     \
    + if(testbit(attrib&,2),"s","-")

endproc

proc GetAttribute

    parameters File$
    Declare info#,file#,utc#,time#,Attrib&,size!,cwrite$,ctime$,awrite$,atime$,wwrite$,wtime$,size$,Attrib$
    Declare cday$,aday$,wday$,return$
    dim info#,36
    dim file#, len(file$)+1
    String file#,0 = file$
    DIM utc#,8
    DIM time#,16
    GetFileAttributesEx(file#,0,info#)
    Attrib& = long(info#,0)'Attribut
    Attrib$ = GetAttribString(attrib&)
    size! = (long(info#,28) * 65536 * 65536) + long(info#,32)'Filesize
    Size$ = Format$("###,###,###,###,###.00",size!)
    return$ = size$+"|"+attrib$
    '-------------------------Erstellzeit
    FileTimeToLocalFileTime(info#+4,utc#)
    FileTimeToSystemTime(utc#,time#)
    cwrite$=""
    ctime$=""

    if word(time#,0) >= 1601

        cday$ = Getweekday(word(time#,4))
        return$ = return$+"|"+cday$+"|"
        cwrite$=Format$("00",word(time#,6))+"."+Format$("00",word(time#,2))+"."+Format$("00",word(time#,0))'Last written date
        ctime$=Format$("00",word(time#,8))+":"+Format$("00",word(time#,10))+":"+Format$("00",word(time#,12))'last written time

    else

        cwrite$="00.00.00"
        ctime$="00:00:00"

    endif

    return$ = return$+cwrite$+"|"+ctime$+"|"
    '-----------------------------letzter Zugriff
    FileTimeToLocalFileTime(info#+12,utc#)
    FileTimeToSystemTime(utc#,time#)
    awrite$=""
    atime$=""

    if word(time#,0) >= 1601

        aday$ = Getweekday(word(time#,4))
        return$ = return$+aday$+"|"
        awrite$=Format$("00",word(time#,6))+"."+Format$("00",word(time#,2))+"."+Format$("00",word(time#,0))'Last written date
        atime$=Format$("00",word(time#,8))+":"+Format$("00",word(time#,10))+":"+Format$("00",word(time#,12))'last written time

    else

        awrite$="00.00.00"
        atime$="00:00:00"

    endif

    return$ = return$+awrite$+"|"+atime$+"|"
    '--------------------------- Zuletzt geschrieben
    FileTimeToLocalFileTime(info#+20,utc#)
    FileTimeToSystemTime(utc#,time#)
    wwrite$=""
    wtime$=""

    if word(time#,0) >= 1601

        wday$ = Getweekday(word(time#,4))
        return$ = return$+wday$+"|"
        wwrite$=Format$("00",word(time#,6))+"."+Format$("00",word(time#,2))+"."+Format$("00",word(time#,0))'Last written date
        wtime$=Format$("00",word(time#,8))+":"+Format$("00",word(time#,10))+":"+Format$("00",word(time#,12))'last written time

    else

        wwrite$="00.00.00"
        wtime$="00:00:00"

    endif

    return$ = return$+wwrite$+"|"+wtime$
    Dispose info#
    Dispose file#
    Dispose UTC#
    Dispose time#
    return return$

endproc

cls
Var t$ = GetAttribute("C:\Autoexec.bat")'Hier Dateipfad
'print t$
print "Filesize:",subStr$(t$,1,"|")
print "Attribut:",subStr$(t$,2,"|")
Print "----------------------"
print "Erstelltag:",subStr$(t$,3,"|")
print "Erstelldatum:",subStr$(t$,4,"|")
print "Erstellzeit:",subStr$(t$,5,"|")
Print "----------------------"
print "Letzter Zugriff Tag:",subStr$(t$,6,"|")
print "Letzter Zugriff Datum:",subStr$(t$,7,"|")
print "Letzter Zugriff Zeit:",subStr$(t$,8,"|")
Print "----------------------"
print "Zuletzt geschrieben Tag:",subStr$(t$,9,"|")
print "Zuletzt geschrieben Datum:",subStr$(t$,10,"|")
print "Zuletzt geschrieben Zeit:",subStr$(t$,11,ot;|")
waitinput
 
19.10.2011  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

Kein Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Bitte anmelden um einen Beitrag zu verfassen.
 

Topic-Options

4.222 Views

Untitledvor 0 min.
H.Brill13.03.2023
p.specht18.11.2021
Wilfried Friebe17.11.2021
Jürgen Strahl17.11.2021
Di più...

Themeninformationen

Dieses Thema hat 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Autori  |  Chat  |  Informativa sulla privacy  |  Download  |  Entrance  |  Aiuto  |  Merchantportal  |  Impronta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Giochi  |  Cerca  |  Support

Ein Projekt aller XProfaner, die es gibt!


Il mio XProfan
Private Notizie
Eigenes Ablageforum
Argomenti-Merkliste
Eigene Beiträge
Eigene Argomenti
Zwischenablage
Annullare
 Deutsch English Français Español Italia
Traduzioni

Informativa sulla privacy


Wir verwenden Cookies nur als Session-Cookies wegen der technischen Notwendigkeit und bei uns gibt es keine Cookies von Drittanbietern.

Wenn du hier auf unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung von Informationen in unseren Cookies auf XProfan.Net zu.

Weitere Informationen zu unseren Cookies und dazu, wie du die Kontrolle darüber behältst, findest du in unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Ich möchte keinen Cookie