Page 1 of 1

Batch convert output to relative path

Posted: Fri Jul 26, 2013 5:21 pm
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.

Re: Batch convert output to relative path

Posted: Fri Jul 26, 2013 5:49 pm
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

Re: Batch convert output to relative path

Posted: Sat Jul 27, 2013 5:15 pm
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. ;-)

Re: Batch convert output to relative path

Posted: Wed Apr 02, 2014 6:56 pm
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!