Not a coder but know the logic like understanding a language but not able to speak it. Environment is Windows server 2016.
Trying to write a .bat file to replace empty spaces with zeros '0' in a file name in a directory. Found a script online and modified. But when I run it I get an error below. Don't understand why. Any help would be appreciated. Thanks.
ERROR- "75553.txt was unexpected at this time."
@echo off
myfile="\\Dev\Out\File\Outfile-name-20200902 75553.txt"
for /f %myfile% do (mv "$f" "${f// /0}") done
echo %myfile%
pause