Echo a single number to all .dll files in a directory
In a folder named "drops" I have 3 .dll files. I am looking for a piece of code that can echo the number 0 to each .dll file without having to echo them individually. Basically, I don't want to have to open up each file and change the number to 0... laziness ensues!
for /f %%G IN (C:\Users\%USERNAME%\Desktop\CMDRPG\player\inventory\drops\*.dll) DO echo 0
I have tried using for. Is my code wrong? Thanks in advance.
Edit: Title didn't have anything to do with my question :D
forfiles /p "C:\Users\%USERNAME%\Desktop\CMDRPG\player\inventory\drops" /m "*.dll" /c "cmd.exe /c echo 0 > @path"
That will do it. Also, in ou code, add > %%G Thats the only mistake I found.
Drop /F, use
FOR %%G IN (C:\Users\%USERNAME%\Desktop\CMDRPG\player\inventory\drops\*.dll) DO ECHO 0
/F will try to open file *.dll.