Is it possible to change the dpi of images which are diveded in several subfolders with only one command??
nconvert -quiet -out 100 -dpi JPEG target/*.jpg
I know the root directory but i didnt know the names of the subfolder in it. So I need an option like -r.
Conversion with subfolders
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 45236
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: nconvert subfolders
I'll add a -r option...Didi wrote:Is it possible to change the dpi of images which are diveded in severall subfolders with only one command??
nconvert -quiet -out 100 -dpi JPEG target/*.jpg
I know the root directory but i didnt know the names of the subfolder in it. So I need an option like -r.
Pierre.
interesting
interesting, but this can be done with some scripts:
for exemple:
Create two files with Script with
*****************SCRIPT de lancement.bat *******************
Setlocal
set REPimages=C:\Sizer_img
set REPscripts=C:\Sizer
set REPnconvert=C:\Sizer\Nconvert-win
c:
cd /d %REPimages%
for /D %%R in (*.) do call %REPscripts%\Sizer_rep.bat "%%R"
Endlocal
*****************SCRIPT Sizer_rep.bat *******************
cd /d "%1"
nconvert ...... *.jpg ......
Echo répertoire "%1" traité
for /D %%R in (*.) do call %REPscripts%\Sizer_rep.bat "%%R"
cd ..
for exemple:
Create two files with Script with
*****************SCRIPT de lancement.bat *******************
Setlocal
set REPimages=C:\Sizer_img
set REPscripts=C:\Sizer
set REPnconvert=C:\Sizer\Nconvert-win
c:
cd /d %REPimages%
for /D %%R in (*.) do call %REPscripts%\Sizer_rep.bat "%%R"
Endlocal
*****************SCRIPT Sizer_rep.bat *******************
cd /d "%1"
nconvert ...... *.jpg ......
Echo répertoire "%1" traité
for /D %%R in (*.) do call %REPscripts%\Sizer_rep.bat "%%R"
cd ..
-
- Posts: 8705
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
Re: nconvert subfolders
Hurray! That will make a difference to nconvert, since this is often needed.xnview wrote:I'll add a -r option...Didi wrote:Is it possible to change the dpi of images which are diveded in severall subfolders with only one command??
nconvert -quiet -out 100 -dpi JPEG target/*.jpg
I know the root directory but i didnt know the names of the subfolder in it. So I need an option like -r.
See also topic "Recurse subdirectories".
-
- Posts: 8705
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
I've just updated and browsed the command line options, but there's still no -r for recursing subdirs available.XeL wrote:When will the -r option be available?
I've added this to the Global Request & Suggestion list and will point Pierre to this feature request.
-
- Posts: 13
- Joined: Wed Jun 04, 2008 7:14 am
Temporary solution I use (WindowsXP) -
cmd file, from this thread - http://newsgroup.xnview.com/viewtopic.php?t=204
modified to look like this -
@for /R /D %%a in (*) do nconvert.exe <your_options_here> "%%a\*.*"
I added /D switch, it prevents running nconvert exe for each single file. Instead, it runs nconvert for each subdirectory (note the "\*.*" file mask at the end). Should be faster this way.
// EDIT
For me, previous sample didn't work when there were spaces in dir names.
Here's an update -
@for /R /D %%a in (*) do nconvert.exe <your_options_here> %%~sa\*.*
~s is a documented 'for' feature, it converts to short path
cmd file, from this thread - http://newsgroup.xnview.com/viewtopic.php?t=204
modified to look like this -
@for /R /D %%a in (*) do nconvert.exe <your_options_here> "%%a\*.*"
I added /D switch, it prevents running nconvert exe for each single file. Instead, it runs nconvert for each subdirectory (note the "\*.*" file mask at the end). Should be faster this way.
// EDIT
For me, previous sample didn't work when there were spaces in dir names.
Here's an update -
@for /R /D %%a in (*) do nconvert.exe <your_options_here> %%~sa\*.*
~s is a documented 'for' feature, it converts to short path
Help with subdirectories
I have several folders (400) in this structure:
\stock\#item_id#\foto\preview
where #item_id# is variable
in the foto subfolder there is a jpg called something_1.jpg
i need to nconvert that jpg and save the result in his "preview" subfolder
Can someone help me with the script?
Thanks in advance!
nget
\stock\#item_id#\foto\preview
where #item_id# is variable
in the foto subfolder there is a jpg called something_1.jpg
i need to nconvert that jpg and save the result in his "preview" subfolder
Can someone help me with the script?
Thanks in advance!
nget