Hi!
Ich hab dir da mal was hingehackt. mit CommandButton1_Click wird das ganze aufgerufen.
------------------------------------------begin copying here 
'by Thomas '03
'##########################################
'Konfiguration
Const stellenanzahl = 4
'z.b. xxxxx0001.jpg /\
’ ^^^^ „“, „“, „“) & sFiles(x) As path & IIf(Right(path, 1) „“, „“, „“) & Left(sFiles(x), Len(sFiles(x)) - (stellenanzahl + 4)) & Format(Val(Right(sFiles(x), (stellenanzahl + 4))) + 100, String(stellenanzahl, „0“)) & Right(sFiles(x), 4)
Next x
MsgBox „Finished!“, vbInformation, „finished!“: End
End Sub
Private Function AllFiles(ByVal FullPath As String) As String()
'***************************************************
'a little bit modified by me!
'http://wwww.freevbcode.com/ShowCode.asp?ID=1331
'************************************************
Set oFs = CreateObject(„Scripting.FileSystemObject“) 'ausgetauscht>>> scriptsupport!
Set oFolder = oFs.GetFolder(FullPath)
Set oFile = oFolder.Files
Dim sAns() As String
Dim lElement As Long
ReDim sAns(0) As String
If oFs.FolderExists(FullPath) Then
Set oFolder = oFs.GetFolder(FullPath)
For Each oFile In oFolder.Files
lElement = IIf(sAns(0) = „“, 0, lElement + 1)
ReDim Preserve sAns(lElement) As String
sAns(lElement) = oFile.Name
Next
End If
AllFiles = sAns
ErrHandler:
Set oFs = Nothing
Set oFolder = Nothing
Set oFile = Nothing
End Function
ich hoffe das hilft dir weiter =)
grüsse
thomas
[email protected]