DeeJay7 Posted March 18, 2016 Posted March 18, 2016 I'm in a requirement to: Open multiple files in multiple directories (not all files are .txt files, some are .ini, some without extension). Example: c:\dir\subdir\file1, c:\dir\subdir\file2.ini, c:\dir2\file3 Find 5 or 6 text strings in above files, string may contain special characters (Ex: %hostname%_a1234) Replace them with new string values Take backup of old files and save the updated files. I've tried few scripts and couldn't get the solution. Appreciate if anybody could help me to achieve this script. Thanks in advance.
alien4u Posted March 18, 2016 Posted March 18, 2016 Paste some code you already try and point why you think the code fail or where you think it fail. Otherwise look like you want people do the job for you and maybe nobody help you. Dgameman1 1
Dgameman1 Posted March 18, 2016 Posted March 18, 2016 1 hour ago, DeeJay7 said: I'm in a requirement to: Open multiple files in multiple directories (not all files are .txt files, some are .ini, some without extension). Example: c:\dir\subdir\file1, c:\dir\subdir\file2.ini, c:\dir2\file3 Find 5 or 6 text strings in above files, string may contain special characters (Ex: %hostname%_a1234) Replace them with new string values Take backup of old files and save the updated files. I've tried few scripts and couldn't get the solution. Appreciate if anybody could help me to achieve this script. Thanks in advance. Do any of the locations have anything in common? Is it every single file in the directory c:\dir? Do the strings youre trying to find have anything in common?
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