Output files not in the expected folder

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

Moderators: XnTriq, helmut, xnview

cutefish.ae
Posts: 7
Joined: Thu Jan 26, 2023 2:18 pm

Output files not in the expected folder

Post by cutefish.ae »

well its not a big problem, but i just want to make it not messy

Code: Select all

"%tools%nconvert" -quiet -overwrite -D -out jpeg "%input%*jfif" "%output%*.jpeg"
but the output file is on /input not in the /output

can someone help me ?
Thanks :D
. HI GUYS, ITS ME CUTEFISH
. You guys can call me as Chelsea
Im an Editor, but i want to be developer
cday
XnThusiast
Posts: 3938
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: How to locate the output file ?

Post by cday »

The source file is normally the last, right-most, term...

Due to the lack of documentation I am not sure whether there can be any exceptions.
cutefish.ae
Posts: 7
Joined: Thu Jan 26, 2023 2:18 pm

Re: How to locate the output file ?

Post by cutefish.ae »

cday wrote: Fri Jan 27, 2023 1:23 pm The source file is normally the last, right-most, term...

Due to the lack of documentation I am not sure whether there can be any exceptions.
here the full code

Code: Select all

@ECHO off
TITLE Bad Footer Fixer
mode con: cols=41 lines=20
set WORKINGDIR=""
set WORKINGDIR=%~dp0
set input=%WORKINGDIR%input\
set output=%WORKINGDIR%output\
set tools=%WORKINGDIR%tools\
:MENU
CLS
@ECHO off
cd %WORKINGDIR%
ECHO.=========================================
ECHO.=           Bad Footer Fixer            =
ECHO.=          version 1.0 STABLE           =
ECHO.=========================================
ECHO.=========================================
ECHO.= 1. Fix All (.JPG AND .PNG)            =
ECHO.= 2. Convert                            =
ECHO.= 3. Help                               =
ECHO.= 4. About                              =
ECHO.=========================================
ECHO.=                0. Exit                =
ECHO.=========================================

:CHOICE_1
set choice_1=
set /p choice_1=Your choice: 
if /i "%choice_1%"=="1" goto FIXALL
if /i "%choice_1%"=="2" goto CONVERT
if /i "%choice_1%"=="3" goto HELP 
if /i "%choice_1%"=="4" goto ABOUT
if /i "%choice_1%"=="0" exit
goto MENU
:ABOUT
cls
ECHO.=========================================
ECHO.=   Thanks for using Bad Footer Fixer   =
ECHO.=     Made with love by cutefish.ae     =
ECHO.=========================================
ECHO.=   I made this tool because im using   =
ECHO.=      Oldest after effect version      =
ECHO.=       and the bad footer error        =
ECHO.=            keep showing up            =
ECHO.=========================================
ECHO.=      Follow my tiktok if you want     =
ECHO.=========================================
pause
goto MENU
 
 
:FIXALL
cls
IF NOT EXIST "%input%*.jpg" (
ECHO.=========================================
ECHO.=  ERROR : PUT UR IMAGE FILE TO /input  =
ECHO.=========================================
pause
goto MENU
) ELSE (
ECHO.=========================================
ECHO.=             Listing  file             =
ECHO.=========================================
cd %input% 
dir /B
ECHO.=========================================
ECHO.=             listing done              =
ECHO.=========================================
timeout /T 2 > nul
cls
ECHO.=========================================
ECHO.=             Fixing Photo              =
ECHO.=========================================
"%tools%nconvert" -quiet -overwrite -D -out jpeg "%input%*jpg" *.jpg
timeout 1 > nul
"%tools%nconvert" -quiet -overwrite -D -out png "%input%*png" *.png
cls
ECHO.=========================================
ECHO.=                Done..                 =
ECHO.=========================================

timeout /T 1 > nul
cls
ECHO.=========================================
ECHO.=       Check your /input file          =
ECHO.=========================================
timeout /T 5 > nul
cls
 goto MENU
)
 
:CONVERT
cls
ECHO.=========================================
ECHO.=             FISH CONVERTER            =
ECHO.=                 V 1.3                 =
ECHO.=========================================
ECHO.=       SPECIAL THANKS FOR FFMPEG       =
ECHO.=========================================
ECHO.=              Start up...              =
ECHO.=========================================
timeout /T 1 > nul
cls
ECHO.=========================================
ECHO.=             FISH CONVERTER            =
ECHO.=                 V 1.3                 =
ECHO.=========================================
ECHO.=                [VIDEO]                =
ECHO.= 1. MP4 TO MP3                         =
ECHO.= 2. AVI TO MP4                         =
ECHO.= 3. MOV TO MP4                         =
ECHO.=                                       =
ECHO.=========================================
ECHO.=                [PHOTO]                =
ECHO.= 4. JFIF TO JPG                        =
ECHO.= 5. JFIF TO PNG                        =
ECHO.=                                       =
ECHO.=========================================
ECHO.=               0. BACK                 =
ECHO.=========================================
set convertsec=
set /p convertsec=Your choice: 
if /i "%convertsec%"=="1" goto JFIFTOJPEG
if /i "%convertsec%"=="2" goto JFIFTOPNG
if /i "%convertsec%"=="3" goto MP4TOMP3
if /i "%convertsec%"=="0" goto MENU
timeout /T 1 > nul

:JFIFTOJPEG
cls
IF NOT EXIST "%input%*.jfif" (
ECHO.=========================================
ECHO.=  ERROR : PUT UR IMAGE FILE TO /input  =
ECHO.=========================================
pause
goto CONVERT
) ELSE (
ECHO.=========================================
ECHO.=              converting               =
ECHO.=========================================
"%tools%nconvert" -quiet -overwrite -D -out jpeg "%input%*jfif" "%output%*.jpeg"
cls
ECHO.=========================================
ECHO.=                Done..                 =
ECHO.=========================================

timeout /T 1 > nul
cls
ECHO.=========================================
ECHO.=       Check your /input file          =
ECHO.=========================================
timeout /T 5 > nul
cls
 goto CONVERT
)



:HELP
ECHO.=========================================
ECHO.=              HELP PAGE                =
ECHO.=            Support page               =
ECHO.=========================================
ECHO.=                                       =
ECHO.=             [HOW TO USE]              =
ECHO.=                                       =
ECHO.= 1. PUT YOUR BROKEN PACKAGE TO /input  =
ECHO.= 2. OPEN Bad Footer Fixer.exe          =
ECHO.= 3. SELECT 1 THEN ENTER                =
ECHO.= 4. AND BOOM, ALL OF YOU PICTURE HAS   =
ECHO.=    BEEN FIXED                         =
ECHO.= 5. JUST IMPORT IT TO AFTER EFFECT     =
ECHO.=    LIKE NORMAL                        =
ECHO.=                                       =
ECHO.=========================================
ECHO.=                                       =
ECHO.=             [KNOWN ERROR]             =
ECHO.=                                       =
ECHO.= 1.ERROR : PUT UR IMAGE FILE TO /input =
ECHO.=  - PUT UR PHOTO TO /input             =
ECHO.=                                       =
ECHO.=========================================

pause
cls
goto MENU
. HI GUYS, ITS ME CUTEFISH
. You guys can call me as Chelsea
Im an Editor, but i want to be developer
cday
XnThusiast
Posts: 3938
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Output files not in the expected folder

Post by cday »

My knowledge of CMD(?) is limited, my suggestion was to try swapping the positions of the input and output terms so that the input term is the last, right-most, terms,

So:

Code: Select all

"%tools%nconvert" -quiet -overwrite -D -out jpeg "%input%*jfif" "%output%*.jpeg"
becomes:

Code: Select all

"%tools%nconvert" -quiet -overwrite -D -out jpeg "%output%*.jpeg" "%input%*jfif" 
User avatar
xnview
Author of XnView
Posts: 43040
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Output files not in the expected folder

Post by xnview »

please use -o
Pierre.
cday
XnThusiast
Posts: 3938
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Output files not in the expected folder

Post by cday »

xnview wrote: Fri Jan 27, 2023 3:50 pmplease use -o
Yes, missing term:

Code: Select all

-o filename       : Output filename