Is it possible to just create a short cut (.lnk) other than a .symlink?
capitalwell opened this issue · 1 comments
Thank you for this helpful app, but there is a case where only a shortcut (.lnk) can work:
Say I wanna keep the reference relationship between two files( SouceA, LinkB ) within a folder synced by a cloud server eg, OneDrive. If LinkB is a symbol link to SouceA, OneDrive and any other sync tools will take it just as SouceA and upload it as SourceA! Then on the cloud server, there would be only SouceA, not just a reference link LinkB. And as I tested with OneDrive, things would become worse if LinkB and SourceA share the same filename ( as your app does ): OneDrive would keep up-downloading SourceA! But if LinkB is a shortcut, this can be evitable as OneDrive just upload it as a .lnk file.
Athough shortcuts don't support relative pathname natively, I found some workarounds like https://superuser.com/questions/644407/using-relative-paths-for-windows-shortcuts and https://stackoverflow.com/questions/1169556/making-a-windows-shortcut-start-relative-to-where-the-folder-is
by adding some parameters into shortcut properties.
Can these workarounds be taken into your app to create shortcuts with relative pathname supported?
Thank you for your helpful feedback. I understand what might go wrong if symlinks are not used correctly. In applications such as OneDrive or other applications, the symlinks appear as files/folders instead of shortcut files (unless applications do extra things for symlinks). Symlinks are file-system level links whereas LNK shortcuts are just files. There are purposes for both of these two types. In my application, as the name SymlinkCreator suggests, I have specifically handled the first one (i.e., symlinks). Because Windows does not provide any GUI alternative for symlink creation. That is why I would like to stick to the features of symlinks. And, for shortcut file creations, there are good alternative tools (like the one mentioned in your link).