Exclusion parameter usage
Moderators: XnTriq, helmut, xnview
-
- Posts: 11
- Joined: Mon Nov 13, 2017 10:55 am
Exclusion parameter usage
I am setting up an image folder that will be frequently added. Those images must be optimized for storage. I am running a bat file that will do them all with Nconvert. However, I needed to exclude the optimized/processed images from the processing. As for now, I am using the functionality of cmd.exe in window to exclude those. I renamed processed file with "_c_" at the end (delete the original). I looped through each files and run the nconvert command for the files that don't have "_c_". I read the help file but do not see a way to exclude certain files. It would act like a filter that include certain files and exclude certain files in processing. Is there a way to do it with Nconvert natively?
-
- Author of XnView
- Posts: 44922
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Exclusion parameter usage
there is no way, but i think that you need to filter the names in the .bat before to start NConvert
Pierre.
-
- Posts: 11
- Joined: Mon Nov 13, 2017 10:55 am
Re: Exclusion parameter usage
Is it possible to include it in the future? Because for inclusion, I can do mass operation for the whole folder like
Code: Select all
nconvert -out jpeg -ratio -rtype lanczos -rflag decr -rflag orient -resize 1400 1400 -D *.png
Code: Select all
-excl *.txt -excl *cc.jpg
-
- XnThusiast
- Posts: 4186
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Exclusion parameter usage
Having previously marked processed files, you could if necessary insert a line in your batch file that moves those files to a temporary directory before processing the new files, and then a line that moves them back afterwards? Should be quick and just adds two lines of code.
Alternatively, the problem wouldn't arise if processed files could have a different extension.
Alternatively, the problem wouldn't arise if processed files could have a different extension.
-
- Posts: 11
- Joined: Mon Nov 13, 2017 10:55 am
Re: Exclusion parameter usage
I think moving files would create more risk than ignoring the files. That problem could multiply if large files (in size and number) are involved. I don't know the operating system and cmd.exe well enough to assert the degree of those problem. But like I said, Nconvert already go through the files' name to determine which one should be processed. Stopping certain files from processing should not be a unreasonably large effort, IMHO.cday wrote: ↑Mon Oct 22, 2018 8:46 am Having previously marked processed files, you could if necessary insert a line in your batch file that moves those files to a temporary directory before processing the new files, and then a line that moves them back afterwards? Should be quick and just adds two lines of code.
I actually just run for *.* because 2 reasons. 1) The images I receives are from 40+ different people with different phone, settings, camera, platform... I don't really know which file type I will receive. I only know that their files is usually too large for my processes. 2)Nconvert will ignore the files it cannot process so it will not be too much problem.
-
- XnThusiast
- Posts: 4186
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: Exclusion parameter usage
I don't know cmd.exe that well either, but if you need a workaround that you can use now, I think it should work. The processed files to be moved will presumably have manageable file sizes.tamle wrote: ↑Mon Oct 22, 2018 9:19 amI think moving files would create more risk than ignoring the files. That problem could multiply if large files (in size and number) are involved. I don't know the operating system and cmd.exe well enough to assert the degree of those problem.cday wrote: ↑Mon Oct 22, 2018 8:46 am Having previously marked processed files, you could if necessary insert a line in your batch file that moves those files to a temporary directory before processing the new files, and then a line that moves them back afterwards? Should be quick and just adds two lines of code.
If files that have been processed are marked with a _ suffix then the files to be moved could be selected using *_.* .
You could also easily, if necessary, create the temporary directory and later delete it (with care) using cmd.exe .
Yes, if Pierre can implement it and you are able to wait.But like I said, NConvert already go through the files' name to determine which one should be processed. Stopping certain files from processing should not be a unreasonably large effort, IMHO.
-
- Posts: 11
- Joined: Mon Nov 13, 2017 10:55 am
Re: Exclusion parameter usage
Sure. I am thinking this could be useful for XNconvert as well. One text box for exclusion parameter could help user don't have to tick check boxes one by one.Yes, if Pierre can implement it and you are able to wait.