timethrow Posted February 4, 2012 Posted February 4, 2012 Hi all, I was wondering if anyone had a simple VB Script to open up ALL the ini files in a folder and its subdirectories and do a basic find and replace so it would replace "REPLACEME" with "IMREPLACED" if you see what I mean. Also does anyone know how to install Windows Remote Deployment Services silently on Windows Server 2003 (SP2 & R2) Thanks
CyberNerd Posted February 4, 2012 Posted February 4, 2012 (edited) a one liner with sed and find Cygwin find C:\ -type f -name "*.ini" -exec sed 's/REPLACEME/IMREPLACED/g' > {} \; I not actually tried that, so might need some playing around with. edit: might be better with #!/bin/bash for fl in *.ini; do mv $fl $fl.old sed 's/REPLACEME/IMREPLACED/g' $fl.old > $fl rm -f $fl.old done Edited February 4, 2012 by CyberNerd
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now