Created
August 18, 2016 08:52
-
-
Save lennartvdd/478dfd099836aafe19731b96192adee3 to your computer and use it in GitHub Desktop.
Randomize Filenames - Useful for randomly presenting images using the default slideshow applications available in Windows
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
#Modify variables as required | |
$srcFolder = "in" | |
$destFolder = "out" | |
Get-ChildItem -File $srcFolder | ForEach-Object { | |
$newFile = $destFolder + "\$(Get-Random)-$($_.Name).jpg" | |
Copy-Item $_.FullName $newFile | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment