Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need a tool to generate several text files in batch

    I often need to create several HMTL documents that have only slight differences. For example, 50 needed files may all need to be identical other than the file name and a couple of field names. All of the different items can be simply numerically incremented, so I figure that there has to be an application available to enter my static data, give it some rules for the dynamic fields, and push a button to have 50 files generated.

    Anyone heard of such an animal? Any help will be greatly appreciated.

    Thanks...

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Scotland
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you want to use php my friend...
    (or ASP or some other kind of server side langauge)

    Here's a nice simple example to display a name and a photo depending on what info is passed via the url:

    Code:
    <html>
    <body>
    <?
    print('Picture of '.$name.'<br>');
    print('<img src="'.$pic.'" alt="'.$name.'">');
    ?>
    </body>
    </html>
    Then the page can display different images by being called like so:
    mypage.php?name=sweenster&pic=me.jpg
    mypage.php?name=frone&pic=you.jpg
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk

  • #3
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the suggestion (and the code snippet), but right now - I would just prefer to find a tool to generate these pages for me.

    Maybe next time I'll take the time to setup PHP.

    Thanks!

  • #4
    New Coder
    Join Date
    Nov 2002
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I agree with sweenster, but I also understand that investing time and effort into learning asp or php to only make 50 pages might not make since.

    One idea would be to make the first page and copy it. On the copy use the 'find & replace' option found in most editors (I use Crimson Editor) to make the changes needed.

    If you want to try a macro tool I recomend EZmacro.

    Good luck.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •