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 ...

Comments

  • Add the folling lines to a file called rn.bat in the directory that has the pics

    ====== 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 ======
  • I used to be not bad at batch files but you are the man! sick.
  • gg Hobbes! :)
  • No way that answer wasn't googled.
  • BBC Z wrote: »
    No way that answer wasn't googled.

    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. :D
  • Thanks Hobbes!
  • Hobbes wrote: »
    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. :D

    Now when someone googles this question, pokerforum.ca will come up and the googler will go "WTF? I thought these guys talked about poker."
  • 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.

    May god have mercy on your soul for still being able to recite crazy DOS batch files in the year 2007 :)
  • lol I am >:D
  • Reading this thread I was wondering. Is there a programmer on this forum that would be willing to listen to me about an idea I have for the import industry. If so PM me and I'll get together with you to discuss further. What I am looking for is a Invoice program that holds a product data base and can be forwarded electronically to my office for processing. I have a couple of clients on their own type of transmission (810 EDI invoice format) but we have to make adjustments at our end for each of them separately.

    Milton Slim
  • Can't believe nobody is interested in discussing this with me. I truly thought it would tweek someones interest! Did I mention money, now I did.
    Milton Slim
  • Sorry dd, I had meant to reply.

    I may be interested.
    I'll PM my contact info
Sign In or Register to comment.