Copy and paste in Bulk Rename Utility:
- Code: Select all
// Rename files at random by assigning a random string as the new name
// This example uses a random 8-character alphanumeric string
// Example: name = "holiday.jpg" -> newName = "A7f2kL9q"
// Note: The extension is not changed here; only the name part
function getRandomString(length) {
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var str = "";
for (var i = 0; i < length; i++) {
str += chars.charAt(Math.floor(Math.random() * chars.length));
}
return str;
}
newName = getRandomString(8); // Change 8 to desired length
// Example:
// name = "holiday.jpg"
// newName = "A7f2kL9q"