Created
August 21, 2018 08:14
-
-
Save ravikumarjain/703eca1998ec8f34067ae997732c4fcd to your computer and use it in GitHub Desktop.
This autohotkey script opens randomly any file from a folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;This is not my original script. I took from sevral places (please see links below) and combined it in one script. | |
;https://autohotkey.com/board/topic/10394-run-some-random-file-jpg-present-in-a-list/ | |
Loop, D:*.pptx | |
{ | |
Filenames .= A_LoopFileFullPath . "`n" | |
} | |
FileAppend, %Filenames% , D:\ravi1.txt | |
Loop, Read, D:\ravi1.txt | |
LineCnt++ | |
Random, LineNum, 1, %LineCnt% | |
FileReadLine, RandomFileToOpen, D:\ravi1.txt, %LineNum% | |
Run, %RandomFileToOpen% | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment