trying to resize and copy to another folder
-
- Posts: 8
- Joined: 2017-02-26T01:44:02-07:00
- Authentication code: 1151
trying to resize and copy to another folder
hey guys!
I'm trying to get these images I have down to a width of 640. They also need to be copied to another folder I created.The originals need to remain unchanged. I'm new to this bat work. I'm kind of lost. This is what I got so far which aint much.
REM RAG
@echo off
C:/Users/mysta/OneDrive/Documents/batch_proj-files
mogrify -path /Users/mysta/OneDrive/Documents/newresizedpics resize 640%*.jpg
I'm trying to get these images I have down to a width of 640. They also need to be copied to another folder I created.The originals need to remain unchanged. I'm new to this bat work. I'm kind of lost. This is what I got so far which aint much.
REM RAG
@echo off
C:/Users/mysta/OneDrive/Documents/batch_proj-files
mogrify -path /Users/mysta/OneDrive/Documents/newresizedpics resize 640%*.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: trying to resize and copy to another folder
I am not sure what is wrong other than you need a space between 640% and *.jpg
If in a bat file, then % needs to be escaped to %%
Your -path folder needs to exist. IM will not create it.
That is the path to the output. You must cd to the input folder first. In Windows you need to provide window paths with \ not /. You are currently using Unix style paths.
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620
For novices, see
viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
If in a bat file, then % needs to be escaped to %%
Your -path folder needs to exist. IM will not create it.
That is the path to the output. You must cd to the input folder first. In Windows you need to provide window paths with \ not /. You are currently using Unix style paths.
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620
For novices, see
viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: trying to resize and copy to another folder
As Fred says, you need a space after %.xander_31404 wrote:resize 640%*.jpg
IM options start with a "-".
In BAT files, each % needs doubling.
So:
Code: Select all
-resize 640%% *.jpg
snibgo's IM pages: im.snibgo.com
-
- Posts: 8
- Joined: 2017-02-26T01:44:02-07:00
- Authentication code: 1151
Re: trying to resize and copy to another folder
Hey guys
I'm sorry if I didn't disclose the correct information to you guys. I'm new to this and trying to figure everything out. I made the correction that yall talked about. When I opened command prompt in the folder of the pictures and ran the bat it said it mogrify' is not recognized as an internal or external command, operable program or batch file.
REM RG
@echo off
C:\Users\mysta\OneDrive\Documents\batch_proj-files
mogrify -path C:\Users\mysta\OneDrive\Documents\web-img -resize 640%% *.jpg
I'm sorry if I didn't disclose the correct information to you guys. I'm new to this and trying to figure everything out. I made the correction that yall talked about. When I opened command prompt in the folder of the pictures and ran the bat it said it mogrify' is not recognized as an internal or external command, operable program or batch file.
REM RG
@echo off
C:\Users\mysta\OneDrive\Documents\batch_proj-files
mogrify -path C:\Users\mysta\OneDrive\Documents\web-img -resize 640%% *.jpg
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: trying to resize and copy to another folder
Have you installed ImageMagick? Where is it? Do you have mogrify.exe?
I suggest you don't do "echo off" until your script works. It just makes debugging harder.
I suggest you don't do "echo off" until your script works. It just makes debugging harder.
snibgo's IM pages: im.snibgo.com
-
- Posts: 8
- Joined: 2017-02-26T01:44:02-07:00
- Authentication code: 1151
Re: trying to resize and copy to another folder
No I do not have imagemagick installed. I was not aware that I had to download a program. I'm in a class an I'm lost. Just not getting great instruction.
Is there a certain place it needs to be downloaded and running from. No I do not have mogrify.exe
Is there a certain place it needs to be downloaded and running from. No I do not have mogrify.exe
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: trying to resize and copy to another folder
For v7 installation: http://www.imagemagick.org/script/binar ... hp#windows
For v6 installation: http://legacy.imagemagick.org/script/bi ... hp#windows
For v6 installation: http://legacy.imagemagick.org/script/bi ... hp#windows
snibgo's IM pages: im.snibgo.com
-
- Posts: 8
- Joined: 2017-02-26T01:44:02-07:00
- Authentication code: 1151
Re: trying to resize and copy to another folder
I downloaded the v7 version and It's still not accepting that bat
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: trying to resize and copy to another folder
Same questions: "Have you installed ImageMagick? Where is it? Do you have mogrify.exe?"
snibgo's IM pages: im.snibgo.com
-
- Posts: 8
- Joined: 2017-02-26T01:44:02-07:00
- Authentication code: 1151
Re: trying to resize and copy to another folder
I have image magick display running from my program folder. Its also has a shortcut on the desktop. Is mogrify.exe come with image magick or do I have to download it from a separate place.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: trying to resize and copy to another folder
Did you follow the intructions on the link that I gave? Did you test that "magick logo: logo.gif" etc worked?
So, you don't have mogrify.exe. Do you have magick.exe? If you do, put "magick" at the front of the fourth line, so it reads:
Incidentally, I don't know what your third line (C:\Users etc) is for or what you want it to do.
So, you don't have mogrify.exe. Do you have magick.exe? If you do, put "magick" at the front of the fourth line, so it reads:
Code: Select all
magick mogrify -path C:\Users\mysta\OneDrive\Documents\web-img -resize 640%% *.jpg
snibgo's IM pages: im.snibgo.com
-
- Posts: 8
- Joined: 2017-02-26T01:44:02-07:00
- Authentication code: 1151
Re: trying to resize and copy to another folder
Ok, this whats suppose to be happening. I have a folder called batch_proj-files that has 11 jpg in it. They need to be resized to the width of 640 then moved to the second folder called web-img. my batch file should take the file extension of the extension of the image type to be resized as an argument.
-
- Posts: 8
- Joined: 2017-02-26T01:44:02-07:00
- Authentication code: 1151
Re: trying to resize and copy to another folder
I did follow the instruction the logo gif worked just fine
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: trying to resize and copy to another folder
So, does it work? What error messages do you get? Did you intend to "cd" to that directory?xander_31404 wrote:Ok, this whats suppose to be happening.
snibgo's IM pages: im.snibgo.com
-
- Posts: 8
- Joined: 2017-02-26T01:44:02-07:00
- Authentication code: 1151
Re: trying to resize and copy to another folder
no it does not work
this is the error I get "mogrify' is not recognized as an internal or external command,
operable program or batch file."
I opened command prompt in the folder that had the original photos in it
this is the error I get "mogrify' is not recognized as an internal or external command,
operable program or batch file."
I opened command prompt in the folder that had the original photos in it