Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env pwsh -command
- get-childitem -Attributes Directory -Exclude @("_zip","_saves") |
- foreach-object {
- cd $_ ;
- get-childitem -filter "*.lnk" |
- foreach-object {
- $l=$s.CreateShortcut($_.FullName);
- $l.TargetPath = $l.TargetPath | foreach {$_.replace("G:\nwjs","C:\nwjs")};
- $l.TargetPath = $l.TargetPath | foreach {$_.replace("D:\nwjs","C:\nwjs")};
- $l.WorkingDirectory = $l.WorkingDirectory | foreach {$_.replace("G:\nwjs","C:\nwjs")};
- $l.WorkingDirectory = $l.WorkingDirectory | foreach {$_.replace("D:\nwjs","C:\nwjs")};
- $l.Save()
- };
- cd ..
- }
- echo done
Advertisement
Add Comment
Please, Sign In to add comment