Batch convert output to relative path

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, helmut, xnview

pough
Posts: 2
Joined: Fri Jul 26, 2013 5:00 pm

Batch convert output to relative path

Post by pough »

RE: XnViewMP 0.61 win64

In the old version (xnview) I was able to use "./subfolder" to specify a relative path for batch conversion output into subfolders of the images being converted. This doesn't seem to work in XnViewMP. I haven't been able to find any information about this so I don't know if it's on purpose, an omission, or requires the use of a different convention. I've found some very old posts that mention relative paths and so I've tried "%/subfolder" and "$/subfolder" and even "{Directory}/subfolder" - all of which create new folders on my Desktop.

Apologies if this is the wrong forum for asking about this. I think that technically it has to do with XnConvert but I'm primarily using XnViewMP.
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Batch convert output to relative path

Post by oops66 »

...And into the menu, for example:
Filename:

Code: Select all

/4-emails_{Folder name}/{Filename}
( *v checked)
v Keep folder structure

v Keep original date/time attributes
v Preserve Metadata
v Preserve color profile
XnViewMP Linux X64 - Debian - X64
User avatar
m.Th.
XnThusiast
Posts: 1676
Joined: Wed Aug 16, 2006 6:31 am

Re: Batch convert output to relative path

Post by m.Th. »

oops66 wrote:...And into the menu, for example:
Filename:

Code: Select all

/4-emails_{Folder name}/{Filename}
( *v checked)
v Keep folder structure

v Keep original date/time attributes
v Preserve Metadata
v Preserve color profile
Or more easier: For each edit box support a simple macro engine which will replace the macros between '<' and '>' with their actual value before passing the edit box value to the actual processing algorithm. I choose to have the macros between angled brackets because these are illegal characters for paths/filenames.

The macro engine doesn't need to be optimized at all - it can be something like:

Code: Select all

function myMacroEngine(aString: string): string;
begin
   Result:=StringReplaceAll(aString, '<DirName>', GetDirName); //-- needs to be CASE INSENSITIVE!
   Result:=StringReplaceAll(Result, '<FileName>', GetFileName);
...etc...
end;
I think that Pierre has something similar or even better for Metadata -> labels, hints. ;-)
m. Th.

- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
pough
Posts: 2
Joined: Fri Jul 26, 2013 5:00 pm

Re: Batch convert output to relative path

Post by pough »

This seems to be working now (I can use just "800" in the output folder) so I thought I would say thank you. Thank you!