Mar
26
26
Replace line of text in file recursively
Posted by jbjorkman on March 26, 2010 underDeprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/myfoto.se/jbits.se/blog/wp-includes/formatting.php on line 82
Powershell
Powershell command to replace a line of text in files recursively, in this example we disable bitmap cache in all Default.rdp files
gci "C:\Documents and Settings" -recurse -force -filter default.rdp | % { Set-Content $_.FullName ((gc $_.fullname) -replace "bitmapcache.*","bitmapcachepersistenable:i:0" )}
Add A Comment
You must be logged in to post a comment.