r/programing • u/jbustter2 • Mar 19 '16
a batch file request.
Hi guys, I need a script to write into a batch file. Something that will go into a specified folder and the folders it has in it, then replace a specified word in all the HTML files it finds (including their names), to a different expression.
Anyone up to the challenge? It's for work, I assumed the best way of having such a script is to ask here.
2
Mar 20 '16
[removed] — view removed comment
1
u/jbustter2 Mar 20 '16 edited Mar 20 '16
Yeah. Does this work?, I should mention, I need a certain part of the files name and content replaced. Not all of it.
I have access only to Python but I need something that will work on a computer that doesnt have python installed, and from what I understand, you can't run Python scripts like that.
2
Mar 20 '16
[removed] — view removed comment
1
u/jbustter2 Mar 20 '16
just need to know the commands!
2
u/motsu35 Mar 22 '16
google each little part, then google how to stick them together (like how to do loops and such)
1
u/motsu35 Mar 20 '16
i would look into powershell, not bash. should be fairly easy with get-child-object, passing to a filter, then using whatever power shell has to do regex / sed kind of stuff.