Ok, so I was trying to make a batch file to rename all pictures in a folder to a random number between 1 and 29, the only problem is, it'll only rename one picture and it says "A duplicate file name exists, or the file cannot be found. So I tried to do a loop code but it did the same thing, except it repeated that message over and over and over. Here is the code.
@echo off
set /A random=%random% %% 29
set /A random=%random% + 1
ren *.gif %random%.gif
pause
exit