1,488
社区成员




Private Sub Form_Load()
Dim sTargetDir As String
Dim sOldDir As String
Dim sNewDir As String
sTargetDir = "f:\mydir" '你放那100个快捷方式的文件夹名
sOldDir = "e:\game\diskgame"
sNewDir = "f:\单机游戏"
Dim oShell As New Shell
Dim oFolder As Folder
Set oFolder = oShell.NameSpace(sTargetDir)
Dim oFile As FolderItem
Dim oShortcut As ShellLinkObject
For Each oFile In oFolder.Items
If oFile.IsLink Then
Set oShortcut = oFile.GetLink
With oShortcut
.Path = Replace(.Path, sOldDir, sNewDir)
.WorkingDirectory = Replace(.WorkingDirectory, sOldDir, sNewDir)
.Save
End With
End If
Next
End Sub