JafSoft Support Forums  
  Products:
AscToHTM (text to HTML) / AscToPDF (text to PDF) / AscToRTF (text to RTF) / Detagger (HTML to text and markup removal) 

 
  Forum options:
Forum Index  Register  Login  Search  FAQ  Log Out
Member options:
My Profile  Inbox  Member List  Address Book  My Subscription  My Forums 
 
 

Note: Some forums require a login other than "Guest" in order to post messages and replies


Create Batch File to Convert Automatically

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums > [Product forums] > AscToHTM > Create Batch File to Convert Automatically Page: [1]
Login
Message << Older Topic   Newer Topic >
Create Batch File to Convert Automatically - 5/31/2008 1:25:43 PM   
library12

 

Posts: 4
Joined: 5/9/2008
Status: offline
Yep, thanks to the tip on creating a CSS file and using it with the convert process, the lines now wrap properly.

One final step to becoming a hero. What I really want is the Red Shirt with the Big S on it.

I have all my scripts running automatically so manual intervention is not needed to create the text files, except for automatically converting from .txt to .html.

Is there a method I can use such as in a batch file to schedule the program to start and create the converted file. If so, I can then upload the files to our server and all I need to do is nothing from now on.

This would also require making sure the CSS file also get incorporated,or does it matter. I noticed I also needed to copy it to the server so the files formatted, so if its there already???

Thanks in advance.





Post #: 1
RE: Create Batch File to Convert Automatically - 6/1/2008 3:56:50 PM   
Jaf

 

Posts: 70
Joined: 2/1/2006
Status: offline
AscToHTM can be invoked from the command line, passing the name of files to be convered and any policy file you want to use, but this isn't ideal since it's a windows application and will tend to open a new window.

For this reason you we also supply a console version of AscToHTM, a2hcons.  Download instructions for that were included with your original email download instructions (contact us via email if you need fresh instructions).

Using a2hcons, you can issue a command such as

c:> a2hcons "c:\my files\*.txt" mypolicy_file.pol


Where the filespec of the files to be converted and the name of any policy file are listed on the command line.  The policy file must have a .pol extension.  you can use the command

c:> a2hcons /?


to get a list of command qualifiers, but the console version is also described in the documentation.  Be aware that the /POLICY attribute is for generating an output policy file to document the optons that have been used, and not to specify the *input* policy file name.  As stated above, that's simply the name of a file with a .pol extension.  (this option has confused so many people now, it will be renamed or removed in future versions).

Using the console version it's possible to create a command that can be placed in a batch file and scheduled as you suggest.

If they ever give you your big red shirt, feel free to tell us about it in the testimonials section

(in reply to library12)
Post #: 2
RE: Create Batch File to Convert Automatically - 6/1/2008 4:06:01 PM   
Jaf

 

Posts: 70
Joined: 2/1/2006
Status: offline
quote:

ORIGINAL: library12
This would also require making sure the CSS file also get incorporated,or does it matter. I noticed I also needed to copy it to the server so the files formatted, so if its there already???


Sorry, I didn't address this in my original reply.  If you create a CSS file, then only one copy need be placed on your server.  You would then tell AscToHTM where this file was to be found (through a relative or absolute URL), and that location would then get saved into your policy file as a conversion option.

Then when you convert files, simply reload the same policy file, and AscToHTM will place the necessary META tag links into the generated HTML to point the files at the common style sheet.  However as long as this link remains valid (i.e. as long as you keep the CSS file on your server), you won't need upload the CSS file each time you convert some additional files.

Note AscToHTM doesn't provide any tools for the management of your CSS file.  You will need to create and upload it using other tools.  All AscToHTM can do is ensure that all your generated HTML references the CSS file of your choice.

Using an external CSS file in this way is better, as changing that one file and uploading it will change the style of all your gerenated HTML.  If you used embedded CSS, you would need to go back and re-convert all the files again which in many cases wouldn't be practical.



(in reply to library12)
Post #: 3
Page:   [1]
All Forums > [Product forums] > AscToHTM > Create Batch File to Convert Automatically Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts