Olympus UK E-System User Group
Olympus UK E-System User Group

Join our unique resource for Olympus Four Thirds E-System DSLR and Pen and OM-D Micro Four Thirds photographers. Show your images via our free e-group photo gallery. Please read the e-group.uk.net forum terms and conditions before posting for the first time. Above all, welcome!


Go Back   Olympus UK E-System User Group > Out of Focus area > The lounge

The lounge Relax, take a break from photo and camera talk - have a chat about something else for a change. Just keep it clean and polite!

Reply
 
Thread Tools Display Modes
  #1  
Old 15th August 2013
Ian's Avatar
Ian Ian is offline
Administrator
 
Join Date: Jul 2007
Location: Hemel Hempstead, Hertfordshire, UK
Posts: 11,590
Thanks: 425
Thanked 2,525 Times in 1,272 Posts
Likes: 870
Liked 1,706 Times in 773 Posts
DOS command line!

Any DOS dudes here?

I am converting some PhotoCD images to JPEG using a DOS prog called PCDJPEG and it only works in the command line, e.g.:

c:\pcdtojpeg -q 100 img0001.pcd

This works fine but there are lots more files to process and I was wondering how to automate this!

Ian
__________________
Founder and editor of:
Olympus UK E-System User Group (http://e-group.uk.net)
Four Thirds User (http://fourthirds-user.com)
Digital Photography Now (http://dpnow.com)
Olympus camera, lens, and accessory hire (http://e-group.uk.net/hire)

Twitter: www.twitter.com/ian_burley
Flickr: www.flickr.com/photos/dpnow/
Pinterest: www.pinterest.com/ianburley/
NEW: My personal BLOG ianburley.com
Reply With Quote
  #2  
Old 15th August 2013
snaarman's Avatar
snaarman snaarman is offline
Full member
 
Join Date: Feb 2008
Location: Baaarkshire UK
Posts: 6,838
Thanks: 494
Thanked 417 Times in 325 Posts
Likes: 492
Liked 1,291 Times in 498 Posts
Re: DOS command line!

Quote:
Originally Posted by Ian View Post
Any DOS dudes here?

I am converting some PhotoCD images to JPEG using a DOS prog called PCDJPEG and it only works in the command line, e.g.:

c:\pcdtojpeg -q 100 img0001.pcd

This works fine but there are lots more files to process and I was wondering how to automate this!

Ian
Hmm. A little C or Basic program to write that sequence (with incrementing file number) to a text file, rename it as a .BAT batch file and run that under DOS.


However you may need to put a pause in each line to allow the conversion to happen, and that would result in "press a key to continue" request after each image..


??

Pete
__________________
Look, I'm an old man. I shouldn't be expected to put up with this.


Pete's photoblog Misleading the public since 2010.
Reply With Quote
  #3  
Old 15th August 2013
timg timg is offline
Full member
 
Join Date: Aug 2008
Location: Cornwall, UK
Posts: 1,208
Thanks: 43
Thanked 115 Times in 110 Posts
Likes: 13
Liked 73 Times in 38 Posts
Re: DOS command line!

You could dump the file listing of the directory to a text file, then import that into Excel and generate the commands and save that as a bat file...
__________________
GX7, EP3, 9-18, 14-45, 45-150, 20 1.7, 25 1.4, 45 1.8, FL36 & various OM glass. flickr
Reply With Quote
  #4  
Old 15th August 2013
f2uk's Avatar
f2uk f2uk is offline
Full member
 
Join Date: Sep 2009
Location: Claughton-on-Brock
Posts: 163
Thanks: 72
Thanked 9 Times in 7 Posts
Likes: 0
Liked 2 Times in 2 Posts
Re: DOS command line!

You could try this:

for /r %i in (*) do pcdtojpeg -q 100 %i
from the command line

or

for /r %%i in (*) do pcdtojpeg -q 100 %%i
if you put it into a batch file

In both cases replace the * with the foldername where your images are (keep the () though)

You shouldn't need the pause as it shouldn't move on to the next file until the first has finished.
__________________
Just for fun .... www.facebook.com/theextrathird

Last edited by f2uk; 15th August 2013 at 01:13 PM. Reason: added info
Reply With Quote
  #5  
Old 15th August 2013
Graham_of_Rainham's Avatar
Graham_of_Rainham Graham_of_Rainham is offline
Administrator
 
Join Date: Nov 2007
Location: Rainham
Posts: 8,131
Thanks: 644
Thanked 940 Times in 728 Posts
Likes: 2,276
Liked 1,581 Times in 911 Posts
Re: DOS command line!

I too would go for creating all the text lines in Excel and then paste it into a batch file.
__________________
Graham

We often repeat the mistakes we most enjoy...
Reply With Quote
  #6  
Old 15th August 2013
Ulfric M Douglas Ulfric M Douglas is offline
Full member
 
Join Date: Mar 2010
Location: Northumberland
Posts: 2,894
Thanks: 263
Thanked 234 Times in 215 Posts
Likes: 128
Liked 172 Times in 119 Posts
Re: DOS command line!

But here it shows a GUI ...

http://www.easy2convert.com/pcd2jpg/



Reply With Quote
The Following User Says Thank You to Ulfric M Douglas For This Useful Post:
ian p (15th August 2013)
  #7  
Old 15th August 2013
OM USer's Avatar
OM USer OM USer is offline
Full member
 
Join Date: Jun 2012
Location: London
Posts: 12,196
Thanks: 2,395
Thanked 1,509 Times in 1,437 Posts
Likes: 6,256
Liked 1,431 Times in 913 Posts
Re: DOS command line!

If the command "c:\pcdtojpeg -q 100 img0001.pcd" is all there is then the simple approach is to create a small batch file.
dir img*.pcd /b > convert.bat
and then edit it in notepad
notepad convert.bat
change all "img" to "c:\pcdtojpeg -q 100 img"
and voila, you have batch file that you can run from the command line
Reply With Quote
  #8  
Old 15th August 2013
ian p's Avatar
ian p ian p is offline
Full member
 
Join Date: Jul 2013
Location: Munich
Posts: 492
Thanks: 19
Thanked 58 Times in 48 Posts
Likes: 4
Liked 148 Times in 93 Posts
Re: DOS command line!

Stay away from the command line and find an easier way.
Reply With Quote
  #9  
Old 15th August 2013
Ian's Avatar
Ian Ian is offline
Administrator
 
Join Date: Jul 2007
Location: Hemel Hempstead, Hertfordshire, UK
Posts: 11,590
Thanks: 425
Thanked 2,525 Times in 1,272 Posts
Likes: 870
Liked 1,706 Times in 773 Posts
Re: DOS command line!

Quote:
Originally Posted by OM USer View Post
If the command "c:\pcdtojpeg -q 100 img0001.pcd" is all there is then the simple approach is to create a small batch file.
dir img*.pcd /b > convert.bat
and then edit it in notepad
notepad convert.bat
change all "img" to "c:\pcdtojpeg -q 100 img"
and voila, you have batch file that you can run from the command line
I will try this - there are 100 images from 0001 to 0100.

Ian
__________________
Founder and editor of:
Olympus UK E-System User Group (http://e-group.uk.net)
Four Thirds User (http://fourthirds-user.com)
Digital Photography Now (http://dpnow.com)
Olympus camera, lens, and accessory hire (http://e-group.uk.net/hire)

Twitter: www.twitter.com/ian_burley
Flickr: www.flickr.com/photos/dpnow/
Pinterest: www.pinterest.com/ianburley/
NEW: My personal BLOG ianburley.com
Reply With Quote
  #10  
Old 15th August 2013
Graham_of_Rainham's Avatar
Graham_of_Rainham Graham_of_Rainham is offline
Administrator
 
Join Date: Nov 2007
Location: Rainham
Posts: 8,131
Thanks: 644
Thanked 940 Times in 728 Posts
Likes: 2,276
Liked 1,581 Times in 911 Posts
Re: DOS command line!

c:\pcdtojpeg -q 100 img0001.pcd
c:\pcdtojpeg -q 100 img0002.pcd
c:\pcdtojpeg -q 100 img0003.pcd
c:\pcdtojpeg -q 100 img0004.pcd
c:\pcdtojpeg -q 100 img0005.pcd
c:\pcdtojpeg -q 100 img0006.pcd
c:\pcdtojpeg -q 100 img0007.pcd
c:\pcdtojpeg -q 100 img0008.pcd
c:\pcdtojpeg -q 100 img0009.pcd
c:\pcdtojpeg -q 100 img0010.pcd
c:\pcdtojpeg -q 100 img0011.pcd
c:\pcdtojpeg -q 100 img0012.pcd
c:\pcdtojpeg -q 100 img0013.pcd
c:\pcdtojpeg -q 100 img0014.pcd
c:\pcdtojpeg -q 100 img0015.pcd
c:\pcdtojpeg -q 100 img0016.pcd
c:\pcdtojpeg -q 100 img0017.pcd
c:\pcdtojpeg -q 100 img0018.pcd
c:\pcdtojpeg -q 100 img0019.pcd
c:\pcdtojpeg -q 100 img0020.pcd
c:\pcdtojpeg -q 100 img0021.pcd
c:\pcdtojpeg -q 100 img0022.pcd
c:\pcdtojpeg -q 100 img0023.pcd
c:\pcdtojpeg -q 100 img0024.pcd
c:\pcdtojpeg -q 100 img0025.pcd
c:\pcdtojpeg -q 100 img0026.pcd
c:\pcdtojpeg -q 100 img0027.pcd
c:\pcdtojpeg -q 100 img0028.pcd
c:\pcdtojpeg -q 100 img0029.pcd
c:\pcdtojpeg -q 100 img0030.pcd
c:\pcdtojpeg -q 100 img0031.pcd
c:\pcdtojpeg -q 100 img0032.pcd
c:\pcdtojpeg -q 100 img0033.pcd
c:\pcdtojpeg -q 100 img0034.pcd
c:\pcdtojpeg -q 100 img0035.pcd
c:\pcdtojpeg -q 100 img0036.pcd
c:\pcdtojpeg -q 100 img0037.pcd
c:\pcdtojpeg -q 100 img0038.pcd
c:\pcdtojpeg -q 100 img0039.pcd
c:\pcdtojpeg -q 100 img0040.pcd
c:\pcdtojpeg -q 100 img0041.pcd
c:\pcdtojpeg -q 100 img0042.pcd
c:\pcdtojpeg -q 100 img0043.pcd
c:\pcdtojpeg -q 100 img0044.pcd
c:\pcdtojpeg -q 100 img0045.pcd
c:\pcdtojpeg -q 100 img0046.pcd
c:\pcdtojpeg -q 100 img0047.pcd
c:\pcdtojpeg -q 100 img0048.pcd
c:\pcdtojpeg -q 100 img0049.pcd
c:\pcdtojpeg -q 100 img0050.pcd
c:\pcdtojpeg -q 100 img0051.pcd
c:\pcdtojpeg -q 100 img0052.pcd
c:\pcdtojpeg -q 100 img0053.pcd
c:\pcdtojpeg -q 100 img0054.pcd
c:\pcdtojpeg -q 100 img0055.pcd
c:\pcdtojpeg -q 100 img0056.pcd
c:\pcdtojpeg -q 100 img0057.pcd
c:\pcdtojpeg -q 100 img0058.pcd
c:\pcdtojpeg -q 100 img0059.pcd
c:\pcdtojpeg -q 100 img0060.pcd
c:\pcdtojpeg -q 100 img0061.pcd
c:\pcdtojpeg -q 100 img0062.pcd
c:\pcdtojpeg -q 100 img0063.pcd
c:\pcdtojpeg -q 100 img0064.pcd
c:\pcdtojpeg -q 100 img0065.pcd
c:\pcdtojpeg -q 100 img0066.pcd
c:\pcdtojpeg -q 100 img0067.pcd
c:\pcdtojpeg -q 100 img0068.pcd
c:\pcdtojpeg -q 100 img0069.pcd
c:\pcdtojpeg -q 100 img0070.pcd
c:\pcdtojpeg -q 100 img0071.pcd
c:\pcdtojpeg -q 100 img0072.pcd
c:\pcdtojpeg -q 100 img0073.pcd
c:\pcdtojpeg -q 100 img0074.pcd
c:\pcdtojpeg -q 100 img0075.pcd
c:\pcdtojpeg -q 100 img0076.pcd
c:\pcdtojpeg -q 100 img0077.pcd
c:\pcdtojpeg -q 100 img0078.pcd
c:\pcdtojpeg -q 100 img0079.pcd
c:\pcdtojpeg -q 100 img0080.pcd
c:\pcdtojpeg -q 100 img0081.pcd
c:\pcdtojpeg -q 100 img0082.pcd
c:\pcdtojpeg -q 100 img0083.pcd
c:\pcdtojpeg -q 100 img0084.pcd
c:\pcdtojpeg -q 100 img0085.pcd
c:\pcdtojpeg -q 100 img0086.pcd
c:\pcdtojpeg -q 100 img0087.pcd
c:\pcdtojpeg -q 100 img0088.pcd
c:\pcdtojpeg -q 100 img0089.pcd
c:\pcdtojpeg -q 100 img0090.pcd
c:\pcdtojpeg -q 100 img0091.pcd
c:\pcdtojpeg -q 100 img0092.pcd
c:\pcdtojpeg -q 100 img0093.pcd
c:\pcdtojpeg -q 100 img0094.pcd
c:\pcdtojpeg -q 100 img0095.pcd
c:\pcdtojpeg -q 100 img0096.pcd
c:\pcdtojpeg -q 100 img0097.pcd
c:\pcdtojpeg -q 100 img0098.pcd
c:\pcdtojpeg -q 100 img0099.pcd
c:\pcdtojpeg -q 100 img0100.pcd
__________________
Graham

We often repeat the mistakes we most enjoy...

Last edited by Graham_of_Rainham; 15th August 2013 at 03:50 PM. Reason: Forgot to strip leading zeros
Reply With Quote
The Following User Says Thank You to Graham_of_Rainham For This Useful Post:
Ian (15th August 2013)
  #11  
Old 15th August 2013
timg timg is offline
Full member
 
Join Date: Aug 2008
Location: Cornwall, UK
Posts: 1,208
Thanks: 43
Thanked 115 Times in 110 Posts
Likes: 13
Liked 73 Times in 38 Posts
Re: DOS command line!

Quote:
Originally Posted by Graham_of_Rainham View Post
c:\pcdtojpeg -q 100 img0001.pcd
c:\pcdtojpeg -q 100 img0002.pcd
...
c:\pcdtojpeg -q 100 img0099.pcd
c:\pcdtojpeg -q 100 img0100.pcd
Another Excel fan I see!
__________________
GX7, EP3, 9-18, 14-45, 45-150, 20 1.7, 25 1.4, 45 1.8, FL36 & various OM glass. flickr
Reply With Quote
  #12  
Old 15th August 2013
Graham_of_Rainham's Avatar
Graham_of_Rainham Graham_of_Rainham is offline
Administrator
 
Join Date: Nov 2007
Location: Rainham
Posts: 8,131
Thanks: 644
Thanked 940 Times in 728 Posts
Likes: 2,276
Liked 1,581 Times in 911 Posts
Thumbs up Re: DOS command line!

Quote:
Originally Posted by timg View Post
Another Excel fan I see!
Absolutly: =CONCATENATE("c:\pcdtojpeg -q 100 img00",BW180,".pcd") where the Column BW was auto filled from 1 to 100. I recall from distant memory that there is even a way to run command lines from within Excel, but I'd simply copy the lot into a file "Convert.bat" and run that.

I have a feeling that "Change" won't work:
The change command changes various terminal server settings like install modes, COM port mappings, and logons.
__________________
Graham

We often repeat the mistakes we most enjoy...

Last edited by Graham_of_Rainham; 15th August 2013 at 04:05 PM. Reason: Explanation added
Reply With Quote
  #13  
Old 15th August 2013
Ian's Avatar
Ian Ian is offline
Administrator
 
Join Date: Jul 2007
Location: Hemel Hempstead, Hertfordshire, UK
Posts: 11,590
Thanks: 425
Thanked 2,525 Times in 1,272 Posts
Likes: 870
Liked 1,706 Times in 773 Posts
Re: DOS command line!

Thanks Graham - I used your generated command list and it worked a treat

Thanks to everyone for all their suggestions!

Ian
__________________
Founder and editor of:
Olympus UK E-System User Group (http://e-group.uk.net)
Four Thirds User (http://fourthirds-user.com)
Digital Photography Now (http://dpnow.com)
Olympus camera, lens, and accessory hire (http://e-group.uk.net/hire)

Twitter: www.twitter.com/ian_burley
Flickr: www.flickr.com/photos/dpnow/
Pinterest: www.pinterest.com/ianburley/
NEW: My personal BLOG ianburley.com
Reply With Quote
  #14  
Old 15th August 2013
Ian's Avatar
Ian Ian is offline
Administrator
 
Join Date: Jul 2007
Location: Hemel Hempstead, Hertfordshire, UK
Posts: 11,590
Thanks: 425
Thanked 2,525 Times in 1,272 Posts
Likes: 870
Liked 1,706 Times in 773 Posts
Re: DOS command line!

Quote:
Originally Posted by Graham_of_Rainham View Post
I too would go for creating all the text lines in Excel and then paste it into a batch file.
I just pasted your list into the command prompt and it worked brilliantly

Ian
__________________
Founder and editor of:
Olympus UK E-System User Group (http://e-group.uk.net)
Four Thirds User (http://fourthirds-user.com)
Digital Photography Now (http://dpnow.com)
Olympus camera, lens, and accessory hire (http://e-group.uk.net/hire)

Twitter: www.twitter.com/ian_burley
Flickr: www.flickr.com/photos/dpnow/
Pinterest: www.pinterest.com/ianburley/
NEW: My personal BLOG ianburley.com
Reply With Quote
  #15  
Old 16th August 2013
blu-by-u blu-by-u is offline
Full member
 
Join Date: Mar 2008
Location: Selangor, Malaysia
Posts: 1,921
Thanks: 225
Thanked 103 Times in 89 Posts
Likes: 346
Liked 691 Times in 365 Posts
Re: DOS command line!

you can replace the c:\pcdtojpeg -q 100 img????.pcd
__________________
* Henry
* Location: Subang Jaya, Selangor
* Malaysia


All my garbage so far.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are these the best on-line prices. Graham_of_Rainham Dealers' Den 6 14th April 2013 07:03 AM
My web site is on line liagasg Exhibitions, stock photos, professional work 1 12th October 2012 04:44 PM
War on the line fridgemagnet Foto Fair 8 13th June 2012 08:02 PM
War on the Line PeterD Foto Fair 9 20th June 2011 07:43 PM
End of the line... crimbo Foto Fair 2 27th November 2009 09:13 PM


All times are GMT. The time now is 03:50 AM.


The Write Technology Ltd, 2007-2019, All rights reservedAd Management plugin by RedTyger