× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi John,



1. It does need to be a Windows shortcut. The idea is simple: we're saving TIFF images to the IFS for a specific period of time, after which we're moving them to an archive directory. The directory to which we are sending them has a path structure such as //server/year/month/terminal/application/image.tiff. This specific format has meaning to us and we'll be able to find this image again years later. However, I want to include a shortcut to this image (in its archive location) in an alternate directory path structure such as //server/document_service_number/image.lnk. The document_service_number is a value that is known to my RPGLE program at runtime and this alternate directory path gives us an alternate method of looking up these archived images.



2. My hope was the QSHELL would have utilities that are either not available in the native OS commands, or function differently. For instance, it was pretty easy to tell that ADDLNK wasn't doing what I wanted. With a little digging I found the QSHELL 'ln' command. This QSHELL command gets me close. If I create a symlink (or hard), I cannot use the '.lnk' extension. If I do, then the file will not open with a double click. If I create a hard link, and give the file the same name (different location) and extension, then the file is created and can be opened with a double click. The downside to a hard link is the file size -- it's the same as the original file to which it points. If I create a symlink with the same file and extension, then the file is created and can be opened with a double click AND the file size is 1KB (regardless of the size of the original -- I've tested with an original that's 498KB). The downside to using the QSHELL 'ln' command is that from the Windows side, the file is not a 'shortcut'. A minor issue, agreed, but not exactly what I was hoping for.



FYI, after using 'ln' to create my synlink, I changed the extension to '.lnk' and the windows file type was changed to 'Shortcut'. However, the file could no longer be opened via double click. Sadly when I changed the extension back to '.txt' (I'm testing with .txt files so that I can update the content and confirm that I'm changing the orginal -- and thus prove that I'm working with only one file -- the original), the file type stayed 'Shortcut' and the file is still not able to be opened via a double click. Moral of this story is do not change the file extensions (in this case)!!!



If anyone has a different experience creating actual Windows shortcuts from an iSeries program, please let me know.



As it stands, QSHELL gets me to a functional POC, but I'm hoping for more.



Thanks!





date: Mon, 8 Jul 2019 14:00:22 -0400

from: John Yeung <gallium.arsenide@xxxxxxxxx<mailto:gallium.arsenide@xxxxxxxxx>>

subject: Re: Creating a Windows Shortcut



On Mon, Jul 8, 2019 at 1:18 PM Jeff Bianchi <Jeff.Bianchi@xxxxxxxx<mailto:Jeff.Bianchi@xxxxxxxx>> wrote:



I'm going to try a QSHELL script that I can call from my RPGLE program. If I get it to work, I'll post the solution.



Earlier you said that a symbolic link didn't meet your needs because it's not a Windows shortcut. So that makes we wonder:



1. Why does it have to be a Windows shortcut? Who are these shortcuts meant for, and why can't they use symlinks instead? I understand that it's often painful to teach users new things, and if that's what it comes down to in your case, that's fine. I just wanted to rule out any technical issues.



2. If it really needs to be a Windows shortcut, how is Qshell going to help you?



John Y.






Jeff Bianchi

Jeff.Bianchi@xxxxxxxx<mailto:Jeff.Bianchi@xxxxxxxx>| P 253.804.1034
Oak Harbor Freight Lines, Inc.
"Bringing Peace of Mind Since 1916."


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.