vbs rename file, KBfile
Hallo, kann mir jemand sagen wie der Script mit "If Exsist" wenn die Datei existiert, das Umbenennen überspringt?
Option Explicit
Function Main
Dim FSO, DATEI, ORDNER, NR
NR=0
Set FSO=WScript.CreateObject("Scripting.FileSystemObject")
Set ORDNER=FSO.GetFolder("C:\Documents and Settings\Desktop\New")
For Each DATEI in ORDNER.Files
If DATEI.FileExists Then
Else
DATEI.Name=DATEI.Size & NR & "." & FSO.GetExtensionName(DATEI)
NR=NR+1
End If
Next
End Function
Main
Gruß waldgnarf
Please also mark the comments that contributed to the solution of the article
Content-Key: 90869
Url: https://administrator.de/contentid/90869
Printed on: April 27, 2024 at 01:04 o'clock