Random ordering of files
I have a bunch of photos. I basically want to "shuffle" them for a slideshow. The digital picture frame I am uploading them to does not have this feature, it always goes in filename order.
So the question is ... how can you do a massive rename (say 300 files) that shuffles the order? Obviously I am not doing this by hand ...
So the question is ... how can you do a massive rename (say 300 files) that shuffles the order? Obviously I am not doing this by hand ...
Comments
====== Start Here ======
@echo off
setlocal
set FileMask=*.jpg
for /f "tokens=*" %%a in ('dir /b /a:-d "%FileMask%"') do call :process "%%a"
goto :leave
:process
:loop
set rnd=%Random%
if exist %rnd%%~x1 goto loop
ren %1 %rnd%%~x1
goto :eof
:leave
===== Done ======
The only part that I didn't know was the %random% shit. Otherwise it's from a batch file that I use to process sql files when I rebuild databases.
And btw BBC, googled answers have to come from somewhere. I know google is all powerful, but as of yet it cannot generate batch file code.
Now when someone googles this question, pokerforum.ca will come up and the googler will go "WTF? I thought these guys talked about poker."
May god have mercy on your soul for still being able to recite crazy DOS batch files in the year 2007
Milton Slim
Milton Slim
I may be interested.
I'll PM my contact info