Home > Back-end >  Ask how to implement
Ask how to implement

Time:09-28

Folder with a, b, c, d, e5 files, points after a button, according to a, b file name, find the folder path, find this folder, and need to get the d, e file part of (assuming it has 192.1.1.1 this value) to replace specific values 182.1.2.200, o master, thank you

CodePudding user response:

Text type? If is the text type using the stringlist line ah

CodePudding user response:

Suggest you use the ini file well,
All parameters, can be put in an INI file, can be classified depositing,
Reading and writing are very convenient,.

CodePudding user response:

You do not to come out of the difficulty?

CodePudding user response:

Novice, d, e are ini format, how to find them and replace, can't write

CodePudding user response:

Procedure TForm1. Button2Click (Sender: TObject);
Var
ATextFile: TStringList;
The begin
ATextFile:=TStringList. Create;
ATextFile. LoadFromFile (' * * * *. Ini ');
StringReplace (aTextFile. Text, '192.1.1.1', '182.1.2.200' [rfReplaceAll]);
The end;

CodePudding user response:

Or surf the Internet to find the first INI file read and write

CodePudding user response:

Thank you upstairs, I under study
  • Related