hello
i have html code in text file like that
<html>
<head>
<title>hello</title>
</head>
<body>
<p>hello world</p>
</body>
</html>
i want generate many html files with random title , content and file names
How i can generate many html files
Re: How i can generate many html files
There is system function RandomString(<num>). But it returns the array of symbols, not words or phrases.
I think that you want to use some meaningful text (not an array of random symbols)
In this case you must have the prepared array of words, phrases or texts in some database. Next you can get random item from this database by it's ID.
This is not very simple job
I think that you want to use some meaningful text (not an array of random symbols)
In this case you must have the prepared array of words, phrases or texts in some database. Next you can get random item from this database by it's ID.
This is not very simple job
Oleg Yershov
Re: How i can generate many html files
yes i created variables ..Oleg wrote: ↑Sun Dec 19, 2021 9:56 am There is system function RandomString(<num>). But it returns the array of symbols, not words or phrases.
I think that you want to use some meaningful text (not an array of random symbols)
In this case you must have the prepared array of words, phrases or texts in some database. Next you can get random item from this database by it's ID.
This is not very simple job
<html>
<head>
<title>{title({RandomValue(10)})}</title>
</head>
<body>
<p>{content({RandomValue(20)})}</p>
</body>
</html>
but i want know how can put this code in files and save it with name from title variables
i hope you help me
thanks
Re: How i can generate many html files
In similar situation I created a number of XML, and even PDF, files using 'Write Text File' but named them with correct extension. I think it can work for HTML files as well.
Re: How i can generate many html files
Also look at the variable UniqueFileName({TempDir}\*.tmp)
Put the folder and file mask as parameter.
For example: {UniqueFileName(c:\incoming\*.html)}
It returns unique file name in this folder.
Put the folder and file mask as parameter.
For example: {UniqueFileName(c:\incoming\*.html)}
It returns unique file name in this folder.
Oleg Yershov