Page 2 of 3

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:25:32-07:00
by fmw42
I actually just need 1 command now:
To convert all "xxx.2x" data´s to xxx data´s with the right size. (The folder can be the Input folder it´s fine.)
You cannot rename files in mogrify. For that you will need to write a script to loop over each image in the directory and process with convert rather than mogrify. Or use mogrify as above and then rename all the resulting files using your OS commands for renaming.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:28:52-07:00
by MomentumHunt91
fmw42 wrote:I think you need to cd to the directory your images are in. Then use the -path option to mogrify to specify the output directory. Then use just * at the end. You may be able to use *@2x*.png. I am not sure of that, but I am pretty sure you cannot have a directory specified that way. You need to use -path for the output directory.
This actually isn´t possible. I want to reupload it on my "userpage" after. And it´ll be a free upload for the game "osu". So it need to work for any downloader. Specificaly cd /path" won´t work for me.

That´s my "MAIN"-problem.
If i go for a specific path it doesn´t work for all, only for me.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:30:38-07:00
by MomentumHunt91
So i guess a need to write a script for it... I beleive it´s a small one but i need to watch some vid´s for it..

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:32:09-07:00
by MomentumHunt91
fmw42 wrote:You cannot rename files in mogrify. For that you will need to write a script to loop over each image in the directory and process with convert rather than mogrify. Or use mogrify as above and then rename all the resulting files using your OS commands for renaming.
Maybe i creat 2 files then. 1 for the outpath. And 1 for the Outpath mogrify resize.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:32:21-07:00
by fmw42
You need to script a batch file to allow you to cd and use an arbitrary path. That is not an IM issue. That is a batch scripting issue. Sorry I cannot help with that. But perhaps a Windows IM user may be able to help or give you pointers.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:33:37-07:00
by fmw42
MomentumHunt91 wrote: Maybe i creat 2 files then. 1 for the outpath. And 1 for the Outpath mogrify resize.
I do not understand. You only need a path to the input directory and to the directory to hold your resized output images. They both have to exist for mogrify to work.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:34:50-07:00
by fmw42
Sorry I know nothing about your game issues. That also is not an IM issue.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:36:08-07:00
by MomentumHunt91
fmw42 wrote:You need to script a batch file to allow you to cd and use an arbitrary path. That is not an IM issue. That is a batch scripting issue.
Ye that´s fine. I´m actually not that good with it i still learn with batch-files. I wouldn´t ask if it it´s not so....:p

Well i got a bit confused by all this informations right now.
Can u give me the command "for the arbytrary path". Would be awesome.

Thanks for all your help by the way!

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:37:20-07:00
by fmw42
Sorry I cannot help with that. I am not a Windows user nor Batch scripter. I only work on a Mac/Unix. But perhaps a Windows IM user may be able to help or give you pointers.

Please read the Windows IM link I mentioned before. Perhaps it will help you.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:37:53-07:00
by MomentumHunt91
fmw42 wrote:Sorry I know nothing about your game issues. That also is not an IM issue.
Yes the prob is i get no error-log for you so i just can explain it.
My only problem was all the time that the pictures i copy won´t get -50% size the rest works.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:38:33-07:00
by MomentumHunt91
fmw42 wrote:Sorry I cannot help with that. I am not a Windows user nor Batch scripter. I only work on a Mac/Unix. But perhaps a Windows IM user may be able to help or give you pointers.

Please read the Windows IM link I mentioned before. Perhaps it will help you.
It´s okay just much thanks to you. You was still a big help.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:40:01-07:00
by fmw42
What us your mogrify command now.
mogrify -format png -path full_path_to\output_directory -resize 50%% *
In batch, your %% is correct. But in a CMD window, you only need one %, as I understand it. But I am no expert on Windows.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:40:54-07:00
by MomentumHunt91
fmw42 wrote:What us your mogrify command now.
mogrify -format png -resize 50%% *
In batch, your %% is correct. But in a CMD window, you only need one %, as I understand it. But I am no expert on Windows.
Yes I use it for my batch with %%. But it doesn´t work like my screen at the beginning. I try it out fast with 1 % gimme a second.

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:42:15-07:00
by fmw42
try using the following in a CMD Window by typing or pasting the command (with a single %) after you cd to the input directory

Code: Select all

mogrify -format png -path full_path_to\output_directory -resize 50% *

Does that work?

Re: Mogrify doesnt work in .bat-file. What to do?

Posted: 2015-08-03T18:46:23-07:00
by MomentumHunt91
fmw42 wrote:try using the following in a CMD Window by typing or pasting the command (with a single %) after you cd to the input directory

Code: Select all

mogrify -format png -path full_path_to\output_directory -resize 50% *

Does that work?
For me it doesn´t work i do something wrong here i guess can´t be else. Tried with 1 % and with 2.
http://img5.fotos-hochladen.net/uploads ... c6date.png Something wrong?