Thomas Bampi wrote to All on 04-18-18 11:03 <=-
Hi All! can you tell me a JS script that can take me in random files
and copy them in a specific file?
Example: I have files that are called logo.1, logo.2, logo.3, logo.4
etc ... the script randomly takes one of these files and copies it as logo.ans
Hi All! can you tell me a JS script that can take me in random files and copy them in a specific file?
Example: I have files that are called logo.1, logo.2, logo.3, logo.4 etc ... the script randomly takes one of these files and copies it as logo.ans
There's an even better example in exec/logon.js (search for "random").
Re: Random Files
By: Digital Man to Thomas Bampi on Wed Apr 18 2018 02:36 pm
There's an even better example in exec/logon.js (search for "random").
I was hoping for an algorithm that would pull a random line out of a text file, but then I broke up my text file into dozens of files with one line each.
I was hoping for an algorithm that would pull a random line out of a text file, but then I broke up my text file into dozens of files with one line each.
Pulling a random line is pretty easy too:
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 31 |
Nodes: | 8 (0 / 8) |
Uptime: | 87:07:52 |
Calls: | 2,069 |
Calls today: | 2 |
Files: | 11,134 |
Messages: | 946,741 |