Das ist möglich - ich werde mir das mal anschauen, wenn ich später wieder Zuhause bin.
VG,
haze303
EDIT:
Code:
Option Explicit
Dim WSHShell, oFSO, oFolder, oFiles, oFile, strOldPath, strNewPath, lnkName, myShortcut
Dim strTarget, strWorkD, strWDRep, strRep, crLnk, strFolder, subFolder, subFiles
Set WSHShell = WS*****.CreateObject("WS*****.Shell")
Set oFSO = WS*****.CreateObject("S*****ing.FileSystemObject")
strFolder = "C:\Users\haze\Desktop\spiele"
If oFSO.FolderExists(strFolder) Then
For Each oFolder In oFSO.GetFolder(strFolder).SubFolders
For Each oFile In oFolder.Files
If UCASE(Right(oFile.Path,4)) = ".LNK" then
'Managing old LNK-Files
strOldPath = "C:\"
strNewPath = "E:\"
lnkName = oFolder & "\" & oFile.Name
Set myShortcut = WSHShell.CreateShortcut(oFile.Path)
strTarget = myShortcut.targetpath
strWorkD = myShortcut.WorkingDirectory
strWDRep = Replace(strWorkD, strOldPath, strNewPath)
strRep = Replace(strtarget, strOldPath, strNewpath)
oFSO.DeleteFile lnkName
'Creating new LNK-File
Set crLnk = WSHShell.CreateShortcut(lnkName)
crLnk.TargetPath = strRep
crLnk.WorkingDirectory = strWDRep
crLnk.save
End If
Next
Next
End If
Anbei das abgeänderte S*****. Jetzt sollte das S***** deine Anforderungen erfüllen.
VG,
haze303