I have script that I'm using to change some IBM Client Access session names. As a part of that I'd like to have the desktop shortcuts named in a specific way: The name of the telnet session followed by the computer name. My issue is that I want to reuse the script for existing computers but the desktop shortcuts can start with several different naming conventions and I need to use a wildcard to select the correct shortcut. What I can't figure out is how to use a wildcard properly in renaming a file. Can anyone help?
Assume that the selection will only return one filename. Thanks in advance.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject( "WScript.Shell" )
'Notice the * in Shortcut to b7-image* below.
objFSO.MoveFile "C:\Documents and Settings\All Users\Desktop\Shortcut to b7-image*" , "C:\Documents and Settings\All Users\Desktop\B7-SYSB " & ComputerName & ".lnk"