Also es gibt ja die Beschreibung einer Datei unter Eigenschaften -> Details.
BSP: angehängt
ich wollte fragen ob es einen direkten Weg gibt das auszulesen. Weil irgentwo muss das ja gespeichert und auslesbar sein sonst könnte es ja nicht angezeigt werden.
MfG
Hallo BangerzZ,
das Thema wurde schon einige Male besprochen. Bitte benutze die Forumssuche und
poste die besten Treffer hier. Vielen Dank!
herbivore
Hallo BangerzZ,
hättest du nach "Änderungsdatum Datei" gesucht dann wärst du auf diesen Link gestossen
Änderungsdatum von Dateien erkennen
Beim nächsten mal bitte selbst mehr Eigeninitiative zeigen
Gruss
Michael
Danke das du voreilige Schlüsse zieht aber das habe ich selbst hier und auch bei Google gefunden. Ich suche eine Funktion/Möglichkeit zB. das Copyright auszulesen und das habe ich hier noch nicht gefunden
Danke das du voreilige Schlüsse zieht aber das habe ich selbst hier und auch bei Google gefunden. Ich suche eine Funktion/Möglichkeit zB. das Copyright auszulesen und das habe ich hier noch nicht gefunden
Da hätest du vielleciht auch irgendwo erwähnen können dass du das Copyright auslesen willst.
Denn im Bild war das Änderungsdatum markiert, deshalb habe ich angenommen dass du dieses willst.
Um an die anderen Eigenschaften zu kommen kannst du die FileVersionInfo-Klasse verwenden
Guckst du hier: http://msdn.microsoft.com/en-us/library/system.diagnostics.fileversioninfo.legalcopyright.aspx
Gruss
Michael
Du kannst die Com-Lib "MS - Shell Controls and Automation" einbinden.
Da kann man mit shell.Namespace() und shellFolder.GetDetailsOf() was deichseln.
Ich hab hier a ber nur ein uraltes Teil in VB6, noch dazu viel Code von mir.
Vlt. kannsteja trotzdem die erahnen, wie man mit dem shell-Objekt arbeitet:
Option Explicit
Private ObjShell As New Shell32.Shell
Private HSplitter As New clsSplitterHorizontal
Dim ColWidth
Private Sub cmdEsc_Click()
Unload Me
End Sub
Private Sub cmdReadMe_Click()
Shell "NotePad " & App.Path & "\ReadMe", vbNormalFocus
End Sub
Private Sub Dir1_KeyUp(KeyCode As Integer, Shift As Integer)
File1.Path = Dir1.List(Dir1.ListIndex)
End Sub
Private Sub Dir1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
File1.Path = Dir1.List(Dir1.ListIndex)
End Sub
Private Sub File1_Click() 'File1 ist eine Art OpenFileDialog
Dim PropIndex%, Fldr As Shell32.Folder, FldrItem As Shell32.FolderItem
Dim sTxt$
Set Fldr = ObjShell.NameSpace(File1.Path)
Set FldrItem = Fldr.Items.Item(File1.FileName)
With List1
For PropIndex = 0 To 39 'Namen von 40 Datei-Eigenschaften auslesen
sTxt = Left(.List(PropIndex), ColWidth(0) + 2 * ColWidth(1) + 1)
If File1.FileName = "" Then
.List(PropIndex) = sTxt
Else
.List(PropIndex) = sTxt & Fldr.GetDetailsOf(FldrItem, PropIndex)
End If
Next
End With
End Sub
Private Sub File1_PathChange()
File1_Click
End Sub
Private Sub Form_Load()
Dim Fldr As Shell32.Folder, FldrItem As Shell32.FolderItem
Dim I%
ColWidth = Array(2, 20, 20)
SetResizeAlignment Dir1, LEFTenm, FLEX_Yenm
SetResizeAlignment File1, LEFTenm, FLEX_Yenm
SetResizeAlignment List1, FLEX_Xenm, FLEX_Yenm 'Form_Resizing initialisieren
HSplitter.Init File1, List1 'Form -Splitting initialisieren
Set Fldr = ObjShell.NameSpace(App.Path)
With List1 'Diese Properties gibt's auf meinem System
On Error Resume Next
.FontName = "Courier New"
On Error GoTo 0
.AddItem sFixLenFormat(ColWidth(0), "0") & sFixLenFormat(ColWidth(1), "Name")
.AddItem sFixLenFormat(ColWidth(0), "1") & sFixLenFormat(ColWidth(1), "Größe")
.AddItem sFixLenFormat(ColWidth(0), "2") & sFixLenFormat(ColWidth(1), "Typ")
.AddItem sFixLenFormat(ColWidth(0), "3") & sFixLenFormat(ColWidth(1), "Geändert am")
.AddItem sFixLenFormat(ColWidth(0), "4") & sFixLenFormat(ColWidth(1), "Erstellt am")
.AddItem sFixLenFormat(ColWidth(0), "5") & sFixLenFormat(ColWidth(1), "Letzter Zugriff am")
.AddItem sFixLenFormat(ColWidth(0), "6") & sFixLenFormat(ColWidth(1), "Attribute")
.AddItem sFixLenFormat(ColWidth(0), "7") & sFixLenFormat(ColWidth(1), "Status")
.AddItem sFixLenFormat(ColWidth(0), "8") & sFixLenFormat(ColWidth(1), "Besitzer")
.AddItem sFixLenFormat(ColWidth(0), "9") & sFixLenFormat(ColWidth(1), "Autor")
.AddItem sFixLenFormat(ColWidth(0), "10") & sFixLenFormat(ColWidth(1), "Titel")
.AddItem sFixLenFormat(ColWidth(0), "11") & sFixLenFormat(ColWidth(1), "Thema")
.AddItem sFixLenFormat(ColWidth(0), "12") & sFixLenFormat(ColWidth(1), "Kategorie")
.AddItem sFixLenFormat(ColWidth(0), "13") & sFixLenFormat(ColWidth(1), "Seiten")
.AddItem sFixLenFormat(ColWidth(0), "14") & sFixLenFormat(ColWidth(1), "Kommentare")
.AddItem sFixLenFormat(ColWidth(0), "15") & sFixLenFormat(ColWidth(1), "Copyright")
.AddItem sFixLenFormat(ColWidth(0), "16") & sFixLenFormat(ColWidth(1), "Interpret")
.AddItem sFixLenFormat(ColWidth(0), "17") & sFixLenFormat(ColWidth(1), "Albumtitel")
.AddItem sFixLenFormat(ColWidth(0), "18") & sFixLenFormat(ColWidth(1), "Jahr")
.AddItem sFixLenFormat(ColWidth(0), "19") & sFixLenFormat(ColWidth(1), "Titelnummer")
.AddItem sFixLenFormat(ColWidth(0), "20") & sFixLenFormat(ColWidth(1), "Genre")
.AddItem sFixLenFormat(ColWidth(0), "21") & sFixLenFormat(ColWidth(1), "Dauer")
.AddItem sFixLenFormat(ColWidth(0), "22") & sFixLenFormat(ColWidth(1), "Bitrate")
.AddItem sFixLenFormat(ColWidth(0), "23") & sFixLenFormat(ColWidth(1), "Geschützt")
.AddItem sFixLenFormat(ColWidth(0), "24") & sFixLenFormat(ColWidth(1), "Kameramodell")
.AddItem sFixLenFormat(ColWidth(0), "25") & sFixLenFormat(ColWidth(1), "Bild aufgenommen am")
.AddItem sFixLenFormat(ColWidth(0), "26") & sFixLenFormat(ColWidth(1), "Abmessungen")
.AddItem sFixLenFormat(ColWidth(0), "27") & sFixLenFormat(ColWidth(1), "")
.AddItem sFixLenFormat(ColWidth(0), "28") & sFixLenFormat(ColWidth(1), "")
.AddItem sFixLenFormat(ColWidth(0), "29") & sFixLenFormat(ColWidth(1), "")
.AddItem sFixLenFormat(ColWidth(0), "30") & sFixLenFormat(ColWidth(1), "Firma")
.AddItem sFixLenFormat(ColWidth(0), "31") & sFixLenFormat(ColWidth(1), "Beschreibung")
.AddItem sFixLenFormat(ColWidth(0), "32") & sFixLenFormat(ColWidth(1), "Dateiversion")
.AddItem sFixLenFormat(ColWidth(0), "33") & sFixLenFormat(ColWidth(1), "Produktname")
.AddItem sFixLenFormat(ColWidth(0), "34") & sFixLenFormat(ColWidth(1), "Produktversion")
.AddItem sFixLenFormat(ColWidth(0), "35") & sFixLenFormat(ColWidth(1), "")
.AddItem sFixLenFormat(ColWidth(0), "36") & sFixLenFormat(ColWidth(1), "")
.AddItem sFixLenFormat(ColWidth(0), "37") & sFixLenFormat(ColWidth(1), "")
.AddItem sFixLenFormat(ColWidth(0), "38") & sFixLenFormat(ColWidth(1), "")
.AddItem sFixLenFormat(ColWidth(0), "39") & sFixLenFormat(ColWidth(1), "")
For I = 0 To 39 'Diese Properties gibt's auf deinem System
.List(I) = .List(I) & sFixLenFormat(ColWidth(1), Fldr.GetDetailsOf("", I)) & " "
Next
End With
File1.Path = Dir1.List(Dir1.ListIndex)
File1.ListIndex = 0
File1_Click
End Sub
Private Sub Form_Resize()
ResizeForm Me
End Sub
Die so gefundenen Dateieigenschaften unterscheiden sich aber je nach Windows-Version
Der frühe Apfel fängt den Wurm.