Reputation: 25
How do I call a function inside loop? I'm trying to run an infinite loop that will run a function(s). I have something like this
#Infinite loop to filter file
while ($true){
#run this function
filterFile
}
function filterFile{
#do filtering of files here
}
function anotherFunction{
#another function
}
If it possible how can I achieve it, if not is there other way?
Upvotes: 2
Views: 3529
Reputation: 9133
Quoting the "TheMadTechnician's" answer. Changing the order will do that:
function filterFile{
#do filtering of files here
}
#Infinite loop to filter file
while ($true){
#run this function
filterFile
}
Upvotes: 2