r/PowerShell • • Jun 12 '22
Is it possible just to modify the drive letters in a shortcut?
[deleted] — view deleted post
5
Upvotes
r/PowerShell • • Jun 12 '22
[deleted] — view deleted post
1
u/BlackV Jun 12 '22
I mean that looks right, is it not working?, are you getting an error, are you testing it?
although I'd use
-filter *.lnknot-includeand for clarity
ForEach($singlefile in $files)vsForEach($file in $files)2
u/vermyx Jun 12 '22
Assuming your paths are being built correctly and not having the variable name instead, I would make sure the replace is happening correctly (since it is case sensetive by default) then I would guess the targetpath is invalid. If it ia invalid a shortcut ian't saved.