Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 05:57:53 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: Files from Text List with Default Content  (Read 3649 times)

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
DONE: Files from Text List with Default Content
« on: March 12, 2013, 02:21:30 PM »
I'd like to create a few dozen HTM files from a list that I would type in a text file.

Each item in the list would be the name of a separate HTM file.

Also, I'd like to specify a block of content (the same content) that would be added to each file upon creation.

Can't find anything like it, anywhere. Hope it's do-able.

-- Bob

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #1 on: March 12, 2013, 03:34:29 PM »
How large is the block of content?

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 585
    • View Profile
    • VDSFreak
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #2 on: March 12, 2013, 03:37:19 PM »
I think I can make something for you. Give me a few.  :)
http://VDSFreak.com
Follow me on Tumblr.com to stay up to date on updates and new software!

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #3 on: March 12, 2013, 03:49:50 PM »
@skwire: Not large. About 50 words. Possibly a bit more, but not much. Thanks! -- Bob

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #4 on: March 12, 2013, 04:01:30 PM »
So, basically, you want a bunch of exact duplicate files with differing filenames, whose filenames are sourced from a list that you provide?  If so, this is a piece of cake with a small AutoHotkey script.  Are you familiar with AutoHotkey at all?

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #5 on: March 12, 2013, 04:07:58 PM »
Yep, that's what I'm looking for. I have some - but not much - familiarity with AHK. An executable would be ideal, but I'd be happy with just the script.

PS. The purpose of this script is to quickly generate the multiple HTML files that comprise an EPUB.

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 585
    • View Profile
    • VDSFreak
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #6 on: March 12, 2013, 04:14:03 PM »
Here is something I whipped up quick. I'll work more on it tomorrow. Let me know if this works for you or you need any adjustments.

https://googledrive.com/host/0B8PfRDn6GacXc0RrWUl1clRCRmc/Multi%20File%20Maker.rar

Going to go spend time with my kids! :-)
http://VDSFreak.com
Follow me on Tumblr.com to stay up to date on updates and new software!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #7 on: March 12, 2013, 04:17:07 PM »
Give Chris' application a run-through and see if it satisfies your initial request.   :)

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #8 on: March 12, 2013, 07:28:31 PM »
Chris - it seems likes a simple, elegant solution, except that I can't get it to work. I entered my file names in in.txt, per instructions, and then from a command prompt did ... mfm.exe in.txt license.txt xhtml c:\staging ... and got back "mfm is not recognized as an internal or external command, operable program or batch file." Probably my error, as my cmd skills are a bit rusty! -- Bob

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 585
    • View Profile
    • VDSFreak
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #9 on: March 12, 2013, 07:39:11 PM »
Did you have the command prompt open in the same directory/folder as mfm.exe? So if you extracted the RAR file to c:\temp you need to open the command prompt and make sure you run mfm.exe from that location.
http://VDSFreak.com
Follow me on Tumblr.com to stay up to date on updates and new software!

pulphero

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 18
    • View Profile
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #10 on: March 12, 2013, 07:52:26 PM »
Wow, I AM rusty. That was the problem. Now that I've run it correctly, the results are just what I want. And I really like the ability to specify a text file as the content block for each generated file. This will save me a lot of time. Thanks so much for a valuable addition to my workflow! -- Bob

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 585
    • View Profile
    • VDSFreak
    • Donate to Member
Re: DONE: Files from Text List with Default Content
« Reply #11 on: March 12, 2013, 07:54:50 PM »
Great! I'm glad it works the way you like. If there is anything else you want added to it let me know. And thank you!
http://VDSFreak.com
Follow me on Tumblr.com to stay up to date on updates and new software!