AW: Machbar ? - JA ! - Wie ? - später mehr ;-) _oT
03.12.2009 20:57:55
Ramses
Hallo
Probier mal
Option Explicit
Const filePath As String = "D:\DeinPfad\"
Sub Bilddateien_in_Tabelle_auflisten()
'Ramses
Dim gefFile As String
Dim myFSO As Object, myFile As Object, strInfo As String
Dim chkFile As String
Dim rowCounter As Long
Set myFSO = CreateObject("Scripting.FileSystemObject")
gefFile = Dir(filePath & "*.*") 'oder nur JPG Dateien: Dir(filePath & "*.jpg")
Application.ScreenUpdating = False
rowCounter = 1
Do While Datei <> ""
Set myFile = myFSO.getfile(gefFile)
'Dateiname in Spalte A
Cells(rowCounter, 1) = myFile.Name
'Speicherdatum in Spalte B
Cells(rowCounter, 1) = myFile.datelastmodified
gefFile = Dir()
rowCounter = rowCounter + 1
Loop
Application.ScreenUpdating = True
End Sub
Sub Bilddateien_umbenennen()
'neuer Name muss mit Dateierweiterung in Spalte C stehen
'spalte C = 3
Dim i As Long
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
Name Cells(i, 1).Text As Cells(i, 3).Text
Next i
End Sub
Gruss Rainer