Error when running windows bat file.
Posted: 2017-02-16T13:47:03-07:00
The command runs fine used directly through the command prompt. When I run it through the bat file it shows this error: MIssingArgument '-format' at CLI arg 3 @fatal/magick-cli.c/ProcessCommandOptions/444
The main goal is to write the pixel counts of black and white to the txt file.
Thanks for any help that can be given.
Here is my bat I am running.
---------------------------
REM ask user for Filename
set /p filename= Enter File Name:
echo The File name is - %filename%.
pause
REM Create Folder
md C:\Users\Public\Pictures\%filename%
ren C:\Users\Public\Pictures\img.bmp %filename%.bmp
move /-Y C:\Users\Public\Pictures\%filename%.bmp C:\Users\Public\Pictures\%filename%\%filename%.bmp
echo Folder created..
echo Processing Image...
REM process Image and place in new folder
magick.exe C:\Users\Public\Pictures\%filename%\%filename%.bmp -monochrome -format %c histogram:info:C:\Users\Public\Pictures\%filename%\%filename%.txt
pause
------------------------
The main goal is to write the pixel counts of black and white to the txt file.
Thanks for any help that can be given.
Here is my bat I am running.
---------------------------
REM ask user for Filename
set /p filename= Enter File Name:
echo The File name is - %filename%.
pause
REM Create Folder
md C:\Users\Public\Pictures\%filename%
ren C:\Users\Public\Pictures\img.bmp %filename%.bmp
move /-Y C:\Users\Public\Pictures\%filename%.bmp C:\Users\Public\Pictures\%filename%\%filename%.bmp
echo Folder created..
echo Processing Image...
REM process Image and place in new folder
magick.exe C:\Users\Public\Pictures\%filename%\%filename%.bmp -monochrome -format %c histogram:info:C:\Users\Public\Pictures\%filename%\%filename%.txt
pause
------------------------