skip owerwrite if exist

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

Moderators: XnTriq, xnview

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

skip owerwrite if exist

Post by ezmax » Tue Nov 11, 2014 2:27 pm

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: 33449
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: skip owerwrite if exist

Post by xnview » Wed Nov 12, 2014 12:32 pm

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 » Fri Aug 28, 2015 2:27 am

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
Posts: 166
Joined: Fri Aug 28, 2015 6:24 am

Re: skip owerwrite if exist

Post by Mixer » Fri Aug 28, 2015 7:10 am

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 » Sat Aug 29, 2015 3:56 pm

Excellent solution Mixer!!! Thanks a lot! Works great!

Mixer
Posts: 166
Joined: Fri Aug 28, 2015 6:24 am

Re: skip owerwrite if exist

Post by Mixer » Sat Aug 29, 2015 11:53 pm

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

Post Reply