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.

Need Your Help

how to change uinavigation controller back button action

iphone objective-c ios

I have a UINavigationController and I have to keep the the default back button "the back arrow style" I just want to ask if I can change the back button action without build new one and change its ...

Optional ManyToOne relationship in Doctrine 2

php mysql symfony2 doctrine2 doctrine

I'm building an application for SNMP Trap logging. It has two MySQL tables: one with the traps, and one with the hosts that I want to log.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.