Author Topic: Using WS-CON.EXE to convert WS6 for Dos to RTF  (Read 5618 times)

BrianW

  • New Member
  • *
  • Posts: 2
  • I love YaBB 1G - SP1!
Using WS-CON.EXE to convert WS6 for Dos to RTF
« on: August 05, 2003, 12:59:09 AM »
Help!! I've got alot of files to convert from WS6 for dos to RTF!  About 500 of them.  Does anyone have a batch file they could send me or paste here that would allow me to do this painlessly?

 I don't remember any of batch file programming and thought that I'd try here in hopes that someone already has had this problem! ;)

If you can help, please email me or post it here.

Brian W.
Martrimm@yahoo.com
« Last Edit: January 01, 1970, 04:00:00 AM by 1111651200 »

Forum Admin

  • Administrator
  • Advanced Member
  • *****
  • Posts: 266
  • Forum Administrator
    • WordStar Resource Site!
Re: Using WS-CON.EXE to convert WS6 for Dos to RTF
« Reply #1 on: August 05, 2003, 04:20:37 AM »
Hi Brian,

Assuming you want to use WS-CON to do the conversions, and that you're running Windows XP or 2000? (other versions of DOS may do it, but I can't test them), you could try this method:

1. First, make a backup of all of your files!

2. Then, make sure you have a copy of WS-CON in the directory where the files you want to convert are.

3. Make sure all the files you want to convert have the same file extension, and that none have your target file extension (RTF).

4. Type the following command (assumes you're converting files with a .WS6 extension):
Code: [Select]
for %I in (*.ws6)  do echo ws-con %I %~nI.rtf /R >> conv.bat
The /R is probably superflous as long as your target extension is RTF and it's RTF files you want - but belt and braces...

5. Run the newly created conv.bat file to control the conversion.

Let me know if this works for you and which version of DOS you try it in.

Cheers
Mike
« Last Edit: January 01, 1970, 04:00:00 AM by 1111651200 »
Forum Administrator
WordStar Resource Site

Join the WordStar mail list at Yahoo Groups

BrianW

  • New Member
  • *
  • Posts: 2
  • I love YaBB 1G - SP1!
Re: Using WS-CON.EXE to convert WS6 for Dos to RTF
« Reply #2 on: August 05, 2003, 01:19:51 PM »
Ok...  Running it in XP.
this is what I'm getting:
C:>conv
The following usage of the path operator in batch-parameter substitution is invalid: %~nI.rtf /R


For valid formats type CALL /? or FOR /?
conv was unexpected at this time.

This is the way the batchfile looks:
--------------------------------------------
for %I in (*.*) do echo ws-con %I %~nI.rtf /R

That is the only line I have in Conv.bat.
There are multiple files and they don't all have a .ws6 extension.   Hope this helps!

Thank you!  I appreciate the help!

Brian
« Last Edit: January 01, 1970, 04:00:00 AM by 1111651200 »

Forum Admin

  • Administrator
  • Advanced Member
  • *****
  • Posts: 266
  • Forum Administrator
    • WordStar Resource Site!
Re: Using WS-CON.EXE to convert WS6 for Dos to RTF
« Reply #3 on: August 06, 2003, 05:34:31 AM »
Hi Brian,

Delete conv.bat by typing: del conv.bat

Now type the following command at the command prompt:
Code: [Select]
for %I in (*.ws6)  do echo ws-con %I %~nI.rtf /R >> conv.bat
This command will create a batch file called conv.bat for you containing the command:
Code: [Select]
ws-con myfile.ws6 myfile.rtf /R
for each and every file in the directory that has a .ws6 file name extension. When you then run conv.bat it repeatedly calls ws-con for every one of those .ws6 files; ws-con will then pump out RTF versions of them.

Where you're going wrong is by putting the initial command inside a batch file rather than just typing it at the command prompt. To use the FOR command in a batch file the variable placeholder %i needs to become %%i.

Cheers
Mike
« Last Edit: January 01, 1970, 04:00:00 AM by 1111651200 »
Forum Administrator
WordStar Resource Site

Join the WordStar mail list at Yahoo Groups