Hi guys.
Welcome back in district Oriel.
We will learn how to do a little outside using our C program.
OK.
And this is our basic C program and we'll go line by line on this is a little hard to find.
OK.
So since we're going to use some of it will function like a brand defined Dremel or having a deterrent
effect.
And as I mentioned earlier this is the main function the program execution or all of this task from
the main function.
And I have one other additive that have indicated that a variable called output.
I'm that because I just want to store the outcome of this particular operation.
OK.
So in order to determine whether it is a success or failure.
So here is the main thing here.
Actually their main function which is really.
So here I'm just passing the parameter.
OK here.
My objective is to delete the text file and off from this particular folder see 10 blocks.
OK so I'll just show you.
See this is my folder see temp logs here.
I'm going to delete this text file and this is my C program.
Please note the are we have to write this in and of course.
OK.
Of course.
OK.
And also there should be no slash.
OK so after this like I'm just evaluating the outcome of this variable where there is a zero or one
in four to zero.
Is it a success here also I'm printing the value of output whatever it is it can buy it in more function.
OK.
So if it is zero it means then it'll come to this slope it is just a basic offensive.
Is it is it sexy.
There's this whole blueprint.
OK.
But a zero.
If this outcome is zero then I would suggest that friends had it done successfully as.
Sorry hit me fine.
Has been deleted successfully.
OK so as if it got the feel that need this operation got failed then it'll get done minus one and then
at that time like this for this validation we'll find any to pin this particular statement OK or debilitated.
Fine OK so this is again zero as you like in our thing from the the compiler for the number ammunition.
OK.
So I'm just closing the packets.
OK so.
OK.
Really good this program and see what happens.
Plus you invite a medic.
Yeah successfully.
So here what I'm going to smoke I'm just.
So when you go this one this particular file instability.
OK.
So now let me take on this one.
No.
The functionality itself is fine.
OK so if this is it the fight got deleted any further than zero.
I mean and then this output variable will capture the value at zero because we're just assigning this
output of this operation.
Good.
I'll put a variable to zero.
Is this pretty low on the function will be executed in is the file has it been successful.
Okay.
See if the fight has been deleted.
OK.
So now we will doing more testing.
So what we do is think we will create a file called Da test one.
OK OK OK.
But if you see here it is text OK but I'm reading a friend contest one so which means this will fail.
OK.
You should have done other than zero which would be my ideal.
Normally do that then minus one.
So which means it's not able to get into a fight.
It's not able to find a front runner.
OK so let's execute this fine and see what happens to the output of the value of output a variable is
minus 1 which means the outcome of the outcome of this operation is minus 1.
So that's what I have printed here.
Since this is minus this output very well it is it is it has a value of minus 1.
This of this validation got feet so different that this message is OK and selling they're not able to
find because the file context is not available.
So it got free.
OK.
So it is.
So we have then manually.
So let's see like how God made this one for example like if I want to leave this particular x y address
on a particular frequency like every day or every week or every month that we can put there possibly
learn in order to delete this file automatically.
OK so you only to do manually.
So this we can do it like by should any job in the live in destruction.
Let's see how Google does.
I'm going to study now
OK.
So no I opened the concert custard let's all create a basic task OK.
So I'm just wanting us to delete them.
Fine.
Okay.
So next here there are multiple option.
OK.
Whether you want to hold the job at daily or weekly or monthly or one day in order to complete a standard
of multiple options here I'm just going to choose this one time because I just want to read this file
only once as part of this demo.
So now put a notice 3 6 here 3 6 p.m. on 19 October 19.
So just for the testing purposes I'm going to make it as 3 7 so in order to execute this particular
order.
Should you let it just come in a minute from now.
So start the Saturday program.
So this one then you have to select the script.
So I'm just going to do this execute will fine.
So next.
And that's what I'm going to open the properties up for this task when I finish.
So be sure this is properties selected.
OK.
And this is the time which I have scheduled here finish.
OK.
So now I'm going to make it.
Yes.
OK
so now we should delete automatically when you begin to see something like
I mean three threes.
So in the to building on the right.
But the frustrating.
So this is how we can automate the file deletion using a C program and I should.