I used the "new" command for link and I used report to get the selection without folders (I'm fat fingered, so I sometimes select a folder with my selection and I don't want to make any folder links. My test was selecting 3 files. When I execute the script from the Catalog, it creates an additional link file which included the .txt extension and added .lnk extension.
See image.
https://1drv.ms/u/s!Ah7Ct43sFaoEgq5brof ... Q?e=toMs7s
Here is the script:
Code: Select all
"Create Shortcuts of Selected Files"
$selFiles = Report("{Dir |{Fullname}|}<crlf>", 1);
$itemcount = Get("CountSelected",$selFiles);
msg $selFiles "Number of Items Selected" $itemcount;
foreach($file, $selFiles, "<crlf>"){
//new(name, [type=file|dir|link|symlink|hardlink|junction], [source], [flags])
new(getpathcomponent($file,"base"),"link",$file);
}Thanks
XYplorer Beta Club