40 aint no joke - General fitness thread
SOMETHING was happening... when I went back to look at the script, the Excel process was all befucked... eventually it showed me that row A of the spreadsheet had an eternal line of 4-digit random numbers being generated. File names did not change.
"Be bold, and mighty forces will come to your aid."
Done, bitches. Powershell script that ought to work.
Replace "C:\testPs" with your root search directory. Tune the 1-100 RN range to your liking. The number generation isn't guaranteed to be unique, but a big enough range should handle that. The largest random value that can be generated is 2,147,483,647.
foreach ($file in Get-ChildItem "C:\testPs")
{
$r = Get-Random -minimum 1 -maximum 101
$name = $file.Name
$rname = "$r" + "$name"
$fullName = $file.FullName
Rename-Item "$fullName" "$rname"
}
There's probably a way to cram it all in one line, but fuck it.
Edited By Malcolm on 1449553192
Replace "C:\testPs" with your root search directory. Tune the 1-100 RN range to your liking. The number generation isn't guaranteed to be unique, but a big enough range should handle that. The largest random value that can be generated is 2,147,483,647.
foreach ($file in Get-ChildItem "C:\testPs")
{
$r = Get-Random -minimum 1 -maximum 101
$name = $file.Name
$rname = "$r" + "$name"
$fullName = $file.FullName
Rename-Item "$fullName" "$rname"
}
There's probably a way to cram it all in one line, but fuck it.
Edited By Malcolm on 1449553192
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
TPRJones wrote:Do the filenames keep getting longer if you run it again to rerandomize?
Argh. Fucking stupid MS string variable interpolation. The latest one I posted in should work without issue and won't make the names grow out to the right.
Uh, yeah, rerandomization would prepend new numbers. Without some file name convention, I can't parse the randomized names intelligently enough to reverse the op. If there's an ASCII character you can guarantee isn't used in your file names, I can key off that. Just blitz the files from the music player, recopy from the source, and randomize anew.
Edited By Malcolm on 1449553270
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
IIRC Office 2000 was a massively pirated version of the software, before unique keys were a thing. And I pretty much LOL at anyone who thinks they need anything better than Word 2000 to write their grocery list on.TheCatt wrote:Why are you running Excell 2000, are you homeless?
So yeah I was given a pirated copy of 2000 back in Memphis and I've never needed anything else.
"Be bold, and mighty forces will come to your aid."
GORDON wrote:Today in the pool I was feeling blah. Two hour school delay means the day was fucked from the get-go... I guess I just do better before 9am that at noon.
Really? I don't wake up until sometime around 2-3pm. I'm ambulatory and moving around, talking and all that other bullshit at 7-8am, but there's no synchronicity until the afternoon. Fuck mornings, they're made to be slept through.
Edited By Malcolm on 1449601829
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
I've noticed my cardio results vary quite a bit, even when I keep my activity, sleep, and caloric intake roughly the same.GORDON wrote:I don't know. I just felt like I didn't have much power in the pool today.
Diogenes of Sinope: "It is not that I am mad, it is only that my head is different from yours."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."
Arnold Judas Rimmer, BSC, SSC: "Better dead than smeg."