Rename all files in directory with random prefix

[1220 views]




In this article, we will learn how to add a random prefix to all files inside a particular folder using bash script.

Bash Script to Rename all files in directory with random prefix:

#!/bin/bash for f in *.jpg; do mv "$f" $RANDOM-"$f" done
                 






Comments










Search Anything:

Sponsored Deals ends in





Technical Quizzes Specially For You:

Search Tags

    Add Random prefix to all files inside a folder