|
| ||||||||||
| Tags: batch script, command, echo, png, png file, root, xpm file |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Batch Script to Convert PNG to XPM
Quote:
|
|
#2
| ||||
| ||||
| Re: Batch Script to Convert PNG to XPM
Do you get what I have performed at that place ? There are two characters in red that were single quotes in your code, have been reverted into the backticks. That is placed on the same key onto the standard system keyboard as the tilde ~ is, in the above left corner. I would suggest that you make the difference more obvious, by performing the same instead: echo "Script Starting.." cd /home/user/Pictures/icons echo "start For loop" for pic in $(ls *.png) do echo "converting $pic" convert $pic $pic.xpm done echo "finished" |
|
#3
| ||||
| ||||
| Re: Batch Script to Convert PNG to XPM
That should resolve the complexities . But there will be single minor flaw. File aaa.png would be converted, for instance , and the name of the newly generated file will be aaa.png.xpm. I am just considering that you need, instead, aaa.xpm. If that is the situation, you have to modify the lines in suggested . for pic in $(ls *.png) do echo "converting $pic" convert $pic $(basename $pic.xpm .xpm) done
__________________ Ram requirement for various OS |
|
#4
| |||
| |||
| Re: Batch Script to Convert PNG to XPM
Thank you very much for the suggestion and I never would have got the tick mark (vs) quote issue. The script executes and I receive the "converting pic" messages as every file is getting processed. But I never search the output/xpm files. The script permission configured as 755, and I have executed the same as root and user. But still I am not getting any files. I am again reading the documentation on permissions (I considered that is the issue) but if you suspect some other issues please let me know about this . Thanks again. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Batch Script to Convert PNG to XPM" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Encrypt batch script content | Aaliya Seth | Software Development | 4 | 01-04-2010 01:10 PM |
| Batch script to delete directory | Logan 2 | Software Development | 4 | 01-04-2010 12:31 PM |
| Need a batch script to map drive | Common | Networking & Security | 3 | 06-07-2009 07:42 PM |
| Need a Batch script to check files | Ashlin | Software Development | 3 | 28-04-2009 03:39 PM |
| How can I play a Wav file from batch/cmd script? | NaFula | Windows Vista Performance | 3 | 13-09-2008 09:21 PM |