Looking For A Text File Mixer

philionaire

Regular Member
Joined
Mar 20, 2010
Messages
212
Reaction score
182
Hey all,

I was scraping some articles (in .txt format) and have since came out with a massive list. These are to be used in blogs via an autoblogging software.

I want to post them randomly and was looking for a way to mix up the files.

Going through the options in win7 i cant see an easy way to do this as they all come out with date (which is title a to z or vics versa, as theyre all the same date), size (I dont really want to go from small to big or vice versa) and date modified (again, mostly sorted by title).

I really want to just have a folder with random titles (obviously linked to the relevant article).

I have SB, but that can only mix urls and such as far as I know. If there is a way to do this with it please let me know.

If not, does anyone know of a simple way to do this?

I have searched google (comes up with a lot of dj mixing software) and the forum, but cant seem to get what im after.

Thanks, Phil.

EDIT: (In case i didnt explain it right)
Just as an example.

I have

article1
article2
article3
article4
artilce5

and i am after something so that when i run it it comes out randomly like:

article4
article2
article5
article1
article3

Thanks.
 
Last edited:
I understand what you mean , I don't know if this tool should do that , but it is the best text manipulation tool I know and you can find on internet , so try to search for TEXTPipe , you will find it here on BHW , I have uploaded it here 3 weeks ago , but honestly I don't know if this tool has random mixing lines , but it has hundreds features, so it should have it too. If it does pls. write it here , I am curious too.
 
I use this to scrambler large chucks of text. It can scramble sentences (by period) which is useful, but it wont output to multiple text files.
Code:
http://www.rjwoerheide.com/scrambletest.php
 
I understand what you mean , I don't know if this tool should do that , but it is the best text manipulation tool I know and you can find on internet , so try to search for TEXTPipe , you will find it here on BHW , I have uploaded it here 3 weeks ago , but honestly I don't know if this tool has random mixing lines , but it has hundreds features, so it should have it too. If it does pls. write it here , I am curious too.

Yeah, I tried that. I actually used it when you posted it as i had a large number of files that i needed to remove all the " ' " from and this done the trick nicley. Its the best tool ive used so far and to sort them by "Numeric Sort" was the best option i could see, but even then 90% of it was sorted a > z. Just wish it had a jumble or mix option lol.

I use this to scrambler large chucks of text. It can scramble sentences (by period) which is useful, but it wont output to multiple text files.
Code:
http://www.rjwoerheide.com/scrambletest.php

Cheers, but it just does it for the words in an article, not physically switching articles around in a folder.

try generating the web
look for it in google.
I use it

Gave it a shot, its really just for individual files and the text inside them, producing spintax and such. I use spinnerchief free for this.
 
Here's the solution in PHP. To use this you would need to install PHP for windows from php.net and run it from a command prompt, or install apache and php and run it from inside your browser.

PHP:
<?php

// Directory with original articles in it
$orig_dir = 'C:/articles';
// Directory to save shuffled articles in
$new_dir  = 'C:/articles_shuffled';


// Get list of original article filenames
$dh = opendir($orig_dir);
while($fn = readdir($dh)) {
	if(preg_match('/.txt/', $fn)) {
		$files[] = $fn;
	}
}
closedir($dh);


// Shuffle the list of filenames
shuffle($files);
shuffle($files);
shuffle($files);

// Make new dir for shuffled articles if necessary
@mkdir($new_dir);

// Copy articles to new dir in shuffled order
$i = 1;
foreach($files as $file) {
	copy("$orig_dir/$file", "$new_dir/$i.txt");
	$i++;
}

?>
 
Back
Top