Forum Discussion
ankit shukla
May 25, 2020Iron Contributor
Check file size and take desired action
I have location where a software saves an Excel File for me. ( I control the location, time and other things) I have a powershell script already that emails this file to my Outlook Groups. I ...
gastone
Jun 28, 2020Brass Contributor
something like this
if ((dir c:\temp\yourExcelfile.xlsx ).Length -gt 500) {"do hard work to sen the e-mail"}
#or
(dir *.xlsx -file)|
?{ $_.Length -gt 500}|
%{"Is greater do hard work to send the e-mail with file $($_.fullname)"}