skip owerwrite if exist

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
ezmax
Posts: 1
Joined: Tue Nov 11, 2014 1:46 pm

skip owerwrite if exist

Post by ezmax »

Is there a command line switch for NConvert?
such as here http://newsgroup.xnview.com/viewtopic.php?t=14476

also this question here http://newsgroup.xnview.com/viewtopic.php?t=19081
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: skip owerwrite if exist

Post by xnview »

by default, if file exists, NConvert rename the output file
Pierre.
Zurdo
Posts: 2
Joined: Fri Aug 28, 2015 2:24 am

Re: skip owerwrite if exist

Post by Zurdo »

Hi. I'm also looking for this command.
I have a folder with many pictures, which I convert to a lower resolution and copy to my mobile. What I'd like to do is to only convert the files that have not been convertedf before.

An nconvert switch like xnconvert's "skip if destination already exists" would be great!

Thanks,
Zurdo.
Mixer
Banned
Posts: 166
Joined: Fri Aug 28, 2015 6:24 am

Re: skip owerwrite if exist

Post by Mixer »

Hi Zurdo. On Windows you could use batch file similar to this.

Code: Select all

@echo off
for %%i in ("C:\Source Directory\*") do (
if not exist "F:\Destination Directory\%%~nxi" start /wait nconvert.exe -o "F:\Destination Directory\%%~nxi" -resize longest 199 "%%i"
)
pause
Zurdo
Posts: 2
Joined: Fri Aug 28, 2015 2:24 am

Re: skip owerwrite if exist

Post by Zurdo »

Excellent solution Mixer!!! Thanks a lot! Works great!
Mixer
Banned
Posts: 166
Joined: Fri Aug 28, 2015 6:24 am

Re: skip owerwrite if exist

Post by Mixer »

You're welcome. It works only while your files have none of characters % # $ in their names.
Post Reply