1
00:00:00,090 --> 00:00:01,870
I will come back in this lecture.

2
00:00:01,980 --> 00:00:11,370
We will learn how to use bison to to meet real world task, which we all benefit from this project in

3
00:00:11,370 --> 00:00:12,340
our life.

4
00:00:12,600 --> 00:00:13,950
So let's begin.

5
00:00:14,550 --> 00:00:24,420
The idea of this project is how to organize the files inside aspecific folders in your PC at your hard

6
00:00:24,420 --> 00:00:24,810
disk.

7
00:00:25,080 --> 00:00:36,690
So we will create a range folder, content file, goodbye and our folder arranged folder content as

8
00:00:36,690 --> 00:00:37,320
following.

9
00:00:38,100 --> 00:00:47,580
So we will save the file as arranged folder content dot by clicking control on this or by clicking file

10
00:00:47,580 --> 00:00:57,090
dropdown, then it should save as and save it to our working file the following.

11
00:00:57,120 --> 00:01:04,970
And that is after naming it first as arranged folder content and click save.

12
00:01:05,490 --> 00:01:15,720
We first bought the python modules that we will use in our project as a OR for converting the system.

13
00:01:16,020 --> 00:01:25,830
And secondly, we will import the shuttle model which make you can copy your files into specific folders.

14
00:01:26,820 --> 00:01:32,510
Every file in our folder is ending with a specific extension.

15
00:01:32,640 --> 00:01:38,840
We will use this file extensions to copy every type of file in a separate folder.

16
00:01:39,240 --> 00:01:49,530
So current underscore they are equal or dot best dot dayanim and inScience apprentices of the dayanim

17
00:01:49,530 --> 00:01:51,630
between two single codes.

18
00:01:51,630 --> 00:01:53,010
Our directory.

19
00:01:53,490 --> 00:02:03,750
We will complete our directory after referring to our file and paste it between the two single codes

20
00:02:03,750 --> 00:02:05,190
inside the two.

21
00:02:07,260 --> 00:02:17,430
Parentheses and because we and that directory of the working folder, we will replace this directory

22
00:02:18,360 --> 00:02:30,750
by double under score file, Darville underscores had to refer to the working directory that we inside

23
00:02:30,900 --> 00:02:31,830
it now.

24
00:02:33,360 --> 00:02:40,710
And to ensure the correctness of our code, we will test it by using the python print function.

25
00:02:42,640 --> 00:02:52,420
To Brent, the current directory as the following Brent between two parentheses current underscore dyche.

26
00:02:54,020 --> 00:03:02,360
Then we will remove the brain function, and instead of brain function, we will complete our code as

27
00:03:02,360 --> 00:03:12,650
the following using for loop to look inside the working folder that we inside it to see the extensions

28
00:03:12,650 --> 00:03:13,430
of files.

29
00:03:13,550 --> 00:03:22,820
Then I start to create new folders and copy these files inside it, then remove it from the working

30
00:03:22,820 --> 00:03:24,750
folders as the following.

31
00:03:25,250 --> 00:03:36,650
So our code will be for filename and or as dot less dir between two parentheses current dir.

32
00:03:37,340 --> 00:03:43,730
So for every file and the working directory we will loop.

33
00:03:44,760 --> 00:03:48,150
Throw the working directory and.

34
00:03:49,080 --> 00:04:00,510
Get this file and will apply actions inside the for Loop has a following, and don't forget the column

35
00:04:01,080 --> 00:04:02,090
of the for loop.

36
00:04:02,670 --> 00:04:07,890
Then inside the for loop we need F conditions.

37
00:04:07,890 --> 00:04:13,400
So to control the flow of the program has a following.

38
00:04:13,410 --> 00:04:14,640
So F.

39
00:04:15,580 --> 00:04:24,640
File name Dot, and this was between two parentheses and inside the two parenthesis two, but this is

40
00:04:24,640 --> 00:04:28,990
also of the end and this was.

41
00:04:31,200 --> 00:04:39,240
And the dot extension between two single codes separated by commas as the following.

42
00:04:40,580 --> 00:04:46,640
So we have Peng and GBC and Jeff to be.

43
00:04:47,930 --> 00:05:00,100
covid to file cold images, and we will use or as dot M.K. Dir to create a folder called Images with

44
00:05:00,140 --> 00:05:11,300
Capital I as the following or as Dot Femke dialogue between two parentheses and to send gecko's images

45
00:05:12,770 --> 00:05:14,480
with capital I.

46
00:05:14,990 --> 00:05:24,320
Then we will use the shuttle module to copy the files in these images folder and the following.

47
00:05:24,950 --> 00:05:36,260
So shuttle that cobie between two parentheses filename comma and between two single codes, images with

48
00:05:36,260 --> 00:05:37,220
eye capital.

49
00:05:38,860 --> 00:05:45,400
So the shuttle that Cobbe MassArt will take to arguments filename.

50
00:05:46,490 --> 00:05:56,930
And the other name that the file will be covid, and now we need to add a line of code to remove.

51
00:05:57,750 --> 00:06:06,870
The fires that covid to that images falder, so we will use or as dot remove Massood as a following

52
00:06:06,870 --> 00:06:11,010
or as dot remove between two parentheses filename.

53
00:06:12,830 --> 00:06:16,120
OK, then we will, Brent.

54
00:06:17,420 --> 00:06:22,610
That the process is done as the following images.

55
00:06:23,780 --> 00:06:24,380
Folder.

56
00:06:28,070 --> 00:06:29,090
Between two.

57
00:06:30,180 --> 00:06:30,930
Single called.

58
00:06:31,950 --> 00:06:42,930
To avoid getting an error, then click on to drop down the belt at well below, build our project and

59
00:06:42,930 --> 00:06:47,580
bison and we finished building our project and running it.

60
00:06:47,970 --> 00:06:57,450
We must adjust our belt at bison programming language to run the cut as a bison.

61
00:06:57,840 --> 00:07:10,680
We will add a nested if statement to ensure that the folder is not existed before we created it by using

62
00:07:10,680 --> 00:07:14,120
go as dot M.K. Dyar method.

63
00:07:14,430 --> 00:07:26,190
So f f not or as best not exists between two parentheses and and inside the two parentheses, two double

64
00:07:26,190 --> 00:07:26,960
quotes.

65
00:07:27,000 --> 00:07:36,540
Then inside the two double codes we will add images, but with Cappotelli, not small AI, which is

66
00:07:36,540 --> 00:07:39,180
the folder name that we want to check.

67
00:07:39,180 --> 00:07:48,390
If it exists or not, then we will build our project as a bison code and it will run without errors.

68
00:07:49,510 --> 00:08:00,010
And so on, we can replicate this block of code for the rest of fires or any fires, you can organize

69
00:08:00,640 --> 00:08:01,590
as follows.

70
00:08:02,170 --> 00:08:13,240
So we will kids this block of code three times again for one for documents and one for APS and one for.

71
00:08:14,240 --> 00:08:21,820
And the last time for vigils has the following that Cevat stop him to.

72
00:08:23,130 --> 00:08:33,360
At the end of the project, we will add a statement all done and run our project, it will run finally,

73
00:08:33,360 --> 00:08:41,730
as you see, it will be all the files and get it to the folders created.

74
00:08:42,330 --> 00:08:55,410
Then it will remove the list of files that have been copied to our folders that that have been created

75
00:08:55,680 --> 00:08:56,830
at this moment.

76
00:08:56,850 --> 00:09:01,050
We reached the end of the project and the end of our video.

77
00:09:02,960 --> 00:09:06,030
Hope you enjoyed this video and get all of that.

78
00:09:07,100 --> 00:09:09,860
Thanks for being here and thanks for watching.

79
00:09:10,100 --> 00:09:12,310
See you next with you.

80
00:09:12,890 --> 00:09:13,610
Bye bye.
