I need to write a batch file that goes into a folder and randomly swaps (renames) all the filenames. This folder has about 1000 files. So it is acceptable if there are few misses.
Asked
Active
Viewed 727 times
2 Answers
1
Are you connected to a network?
Are there any others (computers) on the network?
Do they know your password and username on the targeted user/computer
If so change your password, if a person on the network knows those details, they can modify your computer in any way, they could be the culprit, and are there any other changes that you have noticed, try change your password, if you don't have one, then make one, this will block out anyone from accessing your user, not your whole computer, but probably wont do anything else if it was just that folder
0
Appends random number to file name and preserves extension:
@echo off
setlocal enabledelayedexpansion
for %%F in ("C:\my photos\*.*") do (
rename "%%~fF" "%%~nF!random!%%~xF" || (
echo ERROR: "%%~fF"
)
)
exit /B 0
Vlastimil Ovčáčík
- 3,018