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.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.)
Mogrify doesnt work in .bat-file. What to do?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mogrify doesnt work in .bat-file. What to do?
-
- Posts: 26
- Joined: 2015-08-03T14:15:55-07:00
- Authentication code: 1151
Re: Mogrify doesnt work in .bat-file. What to do?
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.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.
That´s my "MAIN"-problem.
If i go for a specific path it doesn´t work for all, only for me.
-
- Posts: 26
- Joined: 2015-08-03T14:15:55-07:00
- Authentication code: 1151
Re: Mogrify doesnt work in .bat-file. What to do?
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..
-
- Posts: 26
- Joined: 2015-08-03T14:15:55-07:00
- Authentication code: 1151
Re: Mogrify doesnt work in .bat-file. What to do?
Maybe i creat 2 files then. 1 for the outpath. And 1 for the Outpath mogrify resize.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.
Last edited by MomentumHunt91 on 2015-08-03T18:32:42-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mogrify doesnt work in .bat-file. What to do?
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mogrify doesnt work in .bat-file. What to do?
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.MomentumHunt91 wrote: Maybe i creat 2 files then. 1 for the outpath. And 1 for the Outpath mogrify resize.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mogrify doesnt work in .bat-file. What to do?
Sorry I know nothing about your game issues. That also is not an IM issue.
-
- Posts: 26
- Joined: 2015-08-03T14:15:55-07:00
- Authentication code: 1151
Re: Mogrify doesnt work in .bat-file. What to do?
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....:pfmw42 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.
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!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mogrify doesnt work in .bat-file. What to do?
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.
Please read the Windows IM link I mentioned before. Perhaps it will help you.
-
- Posts: 26
- Joined: 2015-08-03T14:15:55-07:00
- Authentication code: 1151
Re: Mogrify doesnt work in .bat-file. What to do?
Yes the prob is i get no error-log for you so i just can explain it.fmw42 wrote:Sorry I know nothing about your game issues. That also is not an IM issue.
My only problem was all the time that the pictures i copy won´t get -50% size the rest works.
-
- Posts: 26
- Joined: 2015-08-03T14:15:55-07:00
- Authentication code: 1151
Re: Mogrify doesnt work in .bat-file. What to do?
It´s okay just much thanks to you. You was still a big help.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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mogrify doesnt work in .bat-file. What to do?
What us your mogrify command now.
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.mogrify -format png -path full_path_to\output_directory -resize 50%% *
-
- Posts: 26
- Joined: 2015-08-03T14:15:55-07:00
- Authentication code: 1151
Re: Mogrify doesnt work in .bat-file. What to do?
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.fmw42 wrote:What us your mogrify command now.
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.mogrify -format png -resize 50%% *
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mogrify doesnt work in .bat-file. What to do?
try using the following in a CMD Window by typing or pasting the command (with a single %) after you cd to the input directory
Does that work?
Code: Select all
mogrify -format png -path full_path_to\output_directory -resize 50% *
Does that work?
-
- Posts: 26
- Joined: 2015-08-03T14:15:55-07:00
- Authentication code: 1151
Re: Mogrify doesnt work in .bat-file. What to do?
For me it doesn´t work i do something wrong here i guess can´t be else. Tried with 1 % and with 2.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?
http://img5.fotos-hochladen.net/uploads ... c6date.png Something wrong?
Last edited by MomentumHunt91 on 2015-08-03T18:58:18-07:00, edited 5 times in total.