Search found 9 matches
- 2013-04-09T12:47:05-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
Re: using convert with find in script
Sorry it took so long to respond. I got a lot of projects on my desk. I double checked the spacing and there was no space between the pipe and the \). I also checked the permissions. The directories are set to 755 and the scipt is 777. The directory that is holding the files just has 1 jpg and 1 png ...
- 2013-04-03T05:18:21-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
Re: using convert with find in script
Do you think it could be Ubuntu causing the error?
- 2013-03-28T07:56:50-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
Re: using convert with find in script
Here is the code with the echo statement find /home/scott/Pictures/ -mtime -2 -type f \( -name '*.JPG' -o -name '*.jpg' \)| xargs -n1 sh -c echo convert "$0" -background white +matte -thumbnail 400x400 "/home/scott/test/${0}.JPG" find /home/scott/Pictures/ -mtime -2 -type f \( -name '*.JPG' -o -name ...
- 2013-03-25T19:48:37-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
Re: using convert with find in script
I added the echo and I get two blank lines. Does that help any?
- 2013-03-22T05:57:07-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
Re: using convert with find in script
I am getting the same results as you are. In my script, I have single quotes around the convert command and I also have double quotes around the patch name and the $0 where the filename is being passed too.
- 2013-03-21T07:46:38-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
Re: using convert with find in script
You got me going somewhere now. I decided to use the shell method you posted. I am getting some new errors now. Here is what my script looks like now and the errors for it. script find /home/scott/Pictures/ -mtime -2 -type f \( -name '*.JPG' -o -name '*.jpg' \)| xargs -n1 sh -c 'convert "$0 ...
- 2013-03-20T10:00:03-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
Re: using convert with find in script
You need to insert the filename as one of the first arguments to convert... for example... .... | xargs -r -I FILE convert FILE ....test/ FILE.JPG OR... have xargs call a shell to handle the argument ($0) in the shell when using a '-c' on command line script. Not this has extra quoting ...
- 2013-03-18T14:06:02-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
Re: using convert with find in script
I made the change and the errors still exist convert: unable to open image `/home/scott/test/%[filename:original].JPG': @ error/blob.c/OpenBlob/2587. convert: missing an image filename `/home/scott/Pictures/201902.jpg' @ error/convert.c/ConvertImageCommand/3011. convert: unable to open image `/home ...
- 2013-03-15T09:33:14-07:00
- Forum: Users
- Topic: using convert with find in script
- Replies: 19
- Views: 21007
using convert with find in script
I have a simple script set up to convert everything in a folder up to 2 days oldto jpg, remove the transpanency of any files, and move it to another folder. I am getting an error that I have spent days searching for an answer to. If I get rid of the find command, it seems to work great. I am running ...