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
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):
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
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
Hi Brian,
Delete conv.bat by typing: del conv.bat
Now type the following command at the command prompt:
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:
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