HI,
I'm wondering whether there is a cmd line app (or a command) which will automatically open the correct app associated with the data file? E.g. if I have a pdf file called a.pdf, I can type on the command line:
[C:\OS2] open a.pdf
(where open is some cmd line app or command) and Lucide is automatically called to open a.pdf? I'm assuming that the EA's have been correctly set for a.pdf.
Thanks for any info!
cytan
Quote from: cytan on 2008.09.04, 23:42:00
HI,
I'm wondering whether there is a cmd line app (or a command) which will automatically open the correct app associated with the data file? E.g. if I have a pdf file called a.pdf, I can type on the command line:
[C:\OS2] open a.pdf
(where open is some cmd line app or command) and Lucide is automatically called to open a.pdf? I'm assuming that the EA's have been correctly set for a.pdf.
Thanks for any info!
cytan
This ought to do the trick for you.
Just put it into a directory that's in your config.sys path statement.
Then open a commandline and type "open" followed by whatever it is that you want opened, be it a directory, or a file. It will use the default application for that file type.
Hi Ben,
I just downloaded it and ran it on the command line. It brought up the app but did not actually load it into the app. Maybe I'm doing something wrong ... I did the following:
[D:\tmp].\open cv.pdf
Opening DEFAULT view for object "D:\tmp\cv.pdf".
And Lucide popped up but cv.pdf was not loaded.
Any pointers?
cytan
Quote from: Ben on 2008.09.05, 00:50:58
Quote from: cytan on 2008.09.04, 23:42:00
HI,
I'm wondering whether there is a cmd line app (or a command) which will automatically open the correct app associated with the data file? E.g. if I have a pdf file called a.pdf, I can type on the command line:
[C:\OS2] open a.pdf
(where open is some cmd line app or command) and Lucide is automatically called to open a.pdf? I'm assuming that the EA's have been correctly set for a.pdf.
Thanks for any info!
cytan
This ought to do the trick for you.
Just put it into a directory that's in your config.sys path statement.
Then open a commandline and type "open" followed by whatever it is that you want opened, be it a directory, or a file. It will use the default application for that file type.
Hmmm, something seems to be screwed up ... I double clicked on the icon for a pdf file and Lucide popped up but also did not have the file displayed. Same with a gif file, pmview popped up but no picture. Hmmm ....
I'd rather not reboot right now. Is the WPS confused?
cytan
Hmm.
You seem to have other problems.
The open.cmd file does nothing in and of itself other than call the program that is associated with the file. It doesn't touch the INI files or make any changes to anything. I've used it for years without a problem.
Do you have anything else there by a similar name? For example "open.exe", that got ran inadvertently?
Just to make sure it did what you want I ran "
I think there may be other problems, may be WPS related. I made sure that it was open.cmd that I called. Weird part is that double clicking on the data file (with the icon related to the app, e.g. Lucide) brings up the app, but it does not display the data. Hmmmm.... a reboot may be in order, but I loathe to do it right now since the box has been up for 10 days now and I'd like to see how long it can go ...
cytan
Hmm..
It seems to me that it has reached its limit. ;)
Though 10 days seems a bit short for OS/2.
Hi Ben,
This is really interesting. open.cmd works for some data files but not others. txt and openoffice files call up the correct app and displays them correctly. But pdf's and gifs do not with Lucide or pmview. Double clicking on a pdf file also brings up Lucide but does not display the file (and similarly pmview)
Do you have the same problem?
cytan
I have never seen that behavior.
I'm wondering if you have INI problems. There are tools out there to deal with this.
Make sure that it doesn't have something to do with spaces in the name, or too many dots.
Also, "Association Editor" (http://hobbes.nmsu.edu/download/pub/os2/util/system/assoed21.zip) might help you.
I prefer the open.exe contained in the FM2 utilities:
ftp://ftp.netlabs.org/pub/fm2/fm2utils.zip
There are some other nice jewels in there too.
Quote from: Glenn on 2008.09.10, 16:17:52
I prefer the open.exe contained in the FM2 utilities:
ftp://ftp.netlabs.org/pub/fm2/fm2utils.zip
There are some other nice jewels in there too.
Ah, yes...
The 'Fm-ly Jewels'... it's always a pleasure to utilize them... /2
:D
P.S. Pardon my play...
The open.cmd here opens directories fine for me (already had a small script that did just that) but is is not opending PDF files. Conversely, open.exe is opening the PDF files as well as directories.
Same holds true for doc files, ppt files, txt files, and just tried a HTM file with the same results.
Andy
I am using Object REXX in case that makes a difference.
Quote from: abwillis on 2008.09.10, 18:19:47
The open.cmd here opens directories fine for me (already had a small script that did just that) but is is not opending PDF files. Conversely, open.exe is opening the PDF files as well as directories.
Same holds true for doc files, ppt files, txt files, and just tried a HTM file with the same results.
Andy
I am using Object REXX in case that makes a difference.
Does double clicking on the pdf file open it correctly?
I used assoedit to re-edit my associations by pointing to Lucide directly, i.e. d:/Lucide/Lucide.exe
rather than using the object Lucide and now it works when I use open.cmd or open.exe
I think something is screwed up with my ini files. However, I still haven't been able to do that with
jpeg files with pmview.
I'll keep you guys posted.
cytan
cytan: There is now a command line app as I think you wish for, or will be
shortly, soon as the Hobbes guy okays it, I guess.
It's yet another variation on my file selector / browser which is general
purpose, editable for associations (by manual editing of the REXX code) to
launch a program depending on file extension. Only a BETA but useful, such as
a front-end for TEDIT.EXE when looking for documentation. Been debating on it
for some time; your post nudged me a bit.
Look for GFSBETA.ZIP at:
http://hobbes2.nmsu.edu/h-browse.php?dir=/pub/incoming&sort=date
If you have the latest MPlayer, which I've found preferable to all previous,
can add it and its types, however, it's a big advantage to have the files
filtered to videos as in a previous selector for K Movie Player:
http://hobbes2.nmsu.edu/download/pub/os2/apps/mmedia/video/players/kmpfs10.zip
This is my current list of known file types for MPlayer:
'*.avi *.wmv *.mpg *.mpeg *.mov *.flv *.rm *.rmvb *.m4v *.asf *.mp4'
May be yet others; I've yet to find documentation. Test by switching filter
off (uppercase 'F'), so that all file types are shown, then <enter> on the
suspected type.
Incidentally, to anyone looking deep into the REXX code, believe I've fixed a
longstanding bug when starting on an empty directory. Previous versions don't
need to be modified because was worked around, but should now be a bit less
finicky for general use.
Quote from: cytan on 2008.09.10, 18:51:09
Quote from: abwillis on 2008.09.10, 18:19:47
The open.cmd here opens directories fine for me (already had a small script that did just that) but is is not opending PDF files. Conversely, open.exe is opening the PDF files as well as directories.
Same holds true for doc files, ppt files, txt files, and just tried a HTM file with the same results.
Andy
I am using Object REXX in case that makes a difference.
Does double clicking on the pdf file open it correctly?
I used assoedit to re-edit my associations by pointing to Lucide directly, i.e. d:/Lucide/Lucide.exe
rather than using the object Lucide and now it works when I use open.cmd or open.exe
I think something is screwed up with my ini files. However, I still haven't been able to do that with
jpeg files with pmview.
I'll keep you guys posted.
cytan
Yes, double clicking opens them fine... the open.exe working shows the association is correct as well.
I'll look at the Rexx Code at some point.
Generalized File Selector version 1 is posted on Hobbes, again awaiting attention by archivist.
This version implements unzipping to temporary directory, and makes major changes to file selector key commands (hope you weren't used to them; changed because _I_ never did get used to them, so made it a little more like OS/2 file dialog at least in lowercase keys jumping to first file starting with that character).
Seems fairly robust. Might make you re-think the whole GUI notion. Improvements probably in store, adding tagging for moving files and directories, depends on what I find useful.
Thanks for the programme. Unfortunately, I'm really busy at work right now, I'll download it as soon as I can and give you some feedback.
Thanks again!
cytan