1
00:00:00,090 --> 00:00:09,180
In this video, I'll write a script which replaces the words amount to the words units in all of the

2
00:00:09,180 --> 00:00:12,510
files within the files folder.

3
00:00:13,680 --> 00:00:15,840
So let's do that again.

4
00:00:15,840 --> 00:00:23,160
We will use the path class and we create a file directory path object.

5
00:00:23,790 --> 00:00:29,000
And then we iterate over that directory for file path and files the 8.0.

6
00:00:31,540 --> 00:00:34,750
We open the file path.

7
00:00:38,730 --> 00:00:50,190
The file path in Reid's modes as file and store the contents in a content variable using the reid's

8
00:00:50,200 --> 00:00:50,700
methods.

9
00:00:54,980 --> 00:00:59,150
The new content now is content DOT replays.

10
00:00:59,990 --> 00:01:03,050
You want to replace amounts with.

11
00:01:06,200 --> 00:01:18,950
Units, so replace some methods of strings, as you can see with Dear Steve, or you see that to replace

12
00:01:19,640 --> 00:01:20,870
is right here.

13
00:01:21,500 --> 00:01:26,990
So it gets a first argument and the second argument and the second argument will replace the first arguments

14
00:01:27,230 --> 00:01:29,380
in that string content string.

15
00:01:30,770 --> 00:01:40,400
And then we open a new file so we on indent and then in the same indentation level with a previous if

16
00:01:40,400 --> 00:01:45,280
we write another eve with open file path in.

17
00:01:45,290 --> 00:01:53,330
Write more this time as file file that writes new content goes in here run.

18
00:01:55,810 --> 00:02:03,130
And check, so we have unions for the first of all, the unions for the second one, units for the third

19
00:02:03,130 --> 00:02:05,860
one, and that is the complete code.

20
00:02:05,860 --> 00:02:07,120
Thank you for following this.

21
00:02:07,330 --> 00:02:09,850
Let's have some more videos suing the next one.

