Help - Search - Members - Calendar
Full Version: Convert Scripts Using Relative Path Output
PMView Pro Forums > PMView Pro Discussion > PMView - General Discussion

This has been an issue recently that I have discovered, and it smells like it might be a bug.

When I am in Open Preview mode and I have selected one or many images to perform a Convert operation, one of the options use is the "Set Output Directory" option. I have discovered a problem if I try to use a relative path.

Here is an example:

I start with my first set of images here "D:\testimages1\original"
I set the output directory to: "..\revised"
...which outputs my files correctly to "D:\testimages1\revised"

But then I go to my next job...

I start with my second set of images here "D:\testimages2\original"
I do not modify the output directory as I still want it to go to "..\revised",
relative to the source directory.
I run the job and it ouputs my files to "D:\testimages1\revised"

Not the expected behaviour I was hoping for. Can this be fixed?

I have experienced this as recently as v3.22 under Windows and have not
tested this under OS/2, but if it a problem there as well, it would be great
if it was fixed there too.

It's a "feature" that dates back to the command line days. Relative paths in PMView are relative to the current working directory, i.e. the directory where you started PMView, not relative to the file open dialog.

Of course, fixing this will break it for command line users that expect the current behavior...

I'll see if I can work around this problem by having the File Open dialog resolve the paths relative to the viewed directory before passing it on to the conversion engine...

Ah, I see. That makes sense. What about a checkbox in the GUI where you can
specify in the "Set Output Directory" settings that it applies to "relative to source file" or something of that nature? Just an on/off optional toggle.

Anyways, even without the change the program is great. Thanks as always for all the hard work! smile.gif
The problem here is the concept of what the "current working directory" (CWD) is. I've gotten at least one other bug report about this. It is obvious that when working from the FOC, one expects the CWD to be the directory viewed in the FOC and not the command line CWD.

After considering all aspects, I think that the whole issue will be fixed if I code PMView to resolve the CWD relative to the FOC directory if the script is launched from the FOC popup menu or from the main menu. However, if the script is lauched from the command line, then the command line CWD will be used.

This should resolve the problem without causing problems for command line users. This fix will be in v3.24.

QUOTE (Peter @ Jan 20 2006, 08:00 PM)
This should resolve the problem without causing problems for command line users. This fix will be in v3.24.


No, no. Thank you! smile.gif
I saw the new download. Thanks again =D
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.