Set ws = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")

'This script must be placed in the folder which contains Storage, Basic Principles, etc. folders
Set MainFolder = fso.GetFolder(".")

'Count the files changed
Dim total
total =0

ModifyLinks(MainFolder)

MsgBox total & " files updated!"
WScript.Quit

'process all the files in the folder
Sub ModifyLinks (foldername)
  Dim file        'for stepping through the files collection        '
  Dim folder      'for stepping through the subfolders collection   '
  Dim fullname    'fully qualified link file name                   '
  Dim targetname  'targetname qualified link file name              '
	Dim link        'object connected to the link file                '
	Dim currentpath
	
	For Each file In fso.GetFolder(foldername).Files
		
    'check only link files
  	If strcomp(right(file.Name,4),".lnk",vbTexctCompare) = 0 Then
  		
    	'Find full path of shortcut
      fullname = fso.GetFileName(file)
      currentpath = fso.GetAbsolutePathName(file)
      targetname = replace(fullname,"¿ì½Ý·½Ê½ µ½ ","")
      targetname = replace(targetname,".lnk","")
      targetname = MainFolder & "\Storage\" & targetname

      'Update the target of the shortcut
      Set link = ws.CreateShortcut(currentpath)
      link.TargetPath = targetname
      link.WorkingDirectory = MainFolder & "\Storage\"
      link.Save
      
      total = total + 1
      
    End If
    
	Next
	
	'process all the subfolders in the folder
  For each folder in fso.GetFolder(foldername).Subfolders
  	Call ModifyLinks(folder.path)
  Next
End Sub

