@@ -0,0 +1,1334 @@
+package photoframerandomselector;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.FileVisitor;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0Aimport java.util.Collections;%0Aimport org.apache.commons.io.FileUtils;%0A%0Apublic class PhotoFrameRandomSelector %7B%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        %0A        //Creating list of files%0A        FileVisitor%3CPath%3E fileLister = new FileLister();%0A        Files.walkFileTree(Paths.get(args%5B0%5D), fileLister);%0A        %0A        //Randomising file order%0A        Collections.shuffle(FileLister.pictures);%0A        %0A        //Creating folder for output%0A        File outputFolder = new File(%22Random images%22);%0A        outputFolder.mkdir();%0A        %0A        for (int i=0; i %3C Integer.valueOf(args%5B1%5D); i++) %7B%0A            String filenamePath = FileLister.pictures.get(i).toString();%0A            String%5B%5D filenameArray1 = filenamePath.split(%22/%22);%0A            String filename = filenameArray1%5BfilenameArray1.length-1%5D;%0A            File source = new File(filenamePath);%0A            File destination = new File(%22Random images/%22+filename);%0A            try %7B%0A                FileUtils.copyFile(source, destination);%0A            %7D catch (IOException e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Create PhotoFrameRandomSelector.java