|
I'm looking for a Windows application that will randomly reorder the lines in a specified text file and save the resulting text to optionally either the original file or a new file. It'd be a bonus if it was possible to have it randomize "more" or "less" on a slider, kind of like how Winamp's shuffle function has the ability to choose tracks more in the order they exist in a playlist or more completely random.
|
# ¿ Mar 5, 2011 19:42 |
|
|
# ¿ Apr 26, 2024 17:49 |
|
Thermopyle posted:Can it be command line? Command line is fine, and the biggest I want to do is about 20 kilobytes in like 5000 lines.
|
# ¿ Mar 5, 2011 20:31 |
|
Hoborg posted:Here y'go: Oh sweet that works awesome! Thanks for the work man.
|
# ¿ Mar 5, 2011 21:11 |
|
I need a program that can clean up my Kindle. Here's what I mean: When you read a book on the kindle, it makes a matching folder in the same folder as the book file is, with a matching name. As an example: For the book at F:\documents\Alien Emergencies_ A Sector General Omnibus_B003J5UJ72.azw it creates a folder F:\documents\Alien Emergencies_ A Sector General Omnibus_B003J5UJ72.sdr that contains metadata and a way to mark your progress in your book. It's supposed to delete the "sidecar" folder when you delete the book on the device, but it doesn't always do it, and the device gets cluttered with these over time. And since there's only like 3 GB of storage on it hundreds of folders at 200 KB to 2 MB does add up. What I'd like is a program that finds all folders with a name ending with ".sdr" in a given folder and its subfolders, and looks for any matching file of the extensions ".azw", ".mobi", ".txt", ".pdf", ".prc", ".pdb", ".azw1" or ".azw3". If the program can't find a match, it should move the ".sdr" folders to another folder where they can then be manually deleted. The program should be able to run on Windows 7 or later, but if it's easier to make it just run on Windows 10 that's fine too.
|
# ¿ Nov 18, 2015 19:09 |
|
mobby_6kl posted:Sorry things got a bit busy. Here you go: The program only moves .sdr files, when it needs to also move folders that are named *.sdr Not sure how to change that in the source code myself, otherwise I just would. It has managed to clean up some older problem files already though so that already helps a bit!
|
# ¿ Nov 20, 2015 23:40 |
|
mobby_6kl posted:Oh wow, somehow I missed that those are folder and not files, even though you explicitly say so in several places. Probably has something to do with reading the requirements at 1:30am Yeah that'll work fine. Thanks for the work!
|
# ¿ Nov 21, 2015 00:21 |
|
|
# ¿ Apr 26, 2024 17:49 |
|
mobby_6kl posted:So that was super straightforward to change but I don't blame you for not messing with that code, it's... a bit sketchy Just used it and it worked perfectly! And my Kindle now has 300 fewer junk folders and about 200 MB of space was recovered. Thanks a lot!
|
# ¿ Nov 22, 2015 00:57 |