sSelectedPath = SelectFolder (ssFDESKTOP, ssFTEXT, ssFFLAGS) If Len(sSelectedPath)=0 Then Wscript.quit Else set fso=createobject("scripting.filesystemobject") thisfolder=sSelectedPath
for each f in fso.getfolder(thisfolder).files ret = left(f.name,instr(f.name,".")-1) ret = ret & "_t" & right(f.name,4) f.name = ret
next
end if
Function SelectFolder(ssFROOT, ssFASK, ssFFLAGS) Set oSHA = CreateObject("Shell.Application") Set oSF = oSHA.BrowseForFolder(0,ssFASK,ssFFLAGS,ssFROOT) If Instr(TypeName(oSF),"Folder")<> 1 Then Exit Function For Each oItem in oSF.ParentFolder.Items If oItem.Name = oSF.title Then SelectFolder = oItem.path Exit Function End If Next SelectFolder = oSF.title End Function
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.