How to Copy Shortcuts
Keywords: copy shortcut ShortcutMake ShortcutExtra
Question:
How to copy the shortcut fileFor eg i have a xyz shortcut in C:\Test dir i need to copy this short cut to D:\Work directory.
Answer:
You can't.Use ShortCutInfo to get all the data out of the shortcut then use ShortCutMake and ShortCutExtra to make a new one.
How to copy a shortcut file.
oldcut="c:\windows\desktop\something.lnk" newcut="c:\temp\something.lnk" info=ShortCutInfo(oldcut) target= ItemExtract(1, info, @tab) params= ItemExtract(2, info, @tab) workdir= ItemExtract(3, info, @tab) showmode= ItemExtract(4, info, @tab) desc= ItemExtract(5, info, @tab) hotkey= ItemExtract(6, info, @tab) iconfile= ItemExtract(7, info, @tab) iconindex= ItemExtract(8, info, @tab) ShortcutMake(newcut, target, params, workdir, showmode) ShortcutExtra(newcut, desc, hotkey, iconfile, iconindex) Message(newcut, "Copied")
Article ID: W14403Filename: Copying Shortcuts.txt