Quantcast
Viewing all articles
Browse latest Browse all 21975

How to check a csv file is blank or not using powershell script

Hi,

I am new to windows shell scripting, infact i have no experience at all,but i have a small requirement, Can someone please help me with it?

I have a csv file in this location C:\temp\abc.csv

So, now i have to write a powershell script which will basically check and see if this file is empty or has any data. I cannot go by the size because even if its empty it has the header rows from a sql table and if it gets the data from sql table also the size remains to be 1 KB. So, i think we need to see if this file has any rows other than the header row and return a yes or no.


Can someone please help me with this?

Thanks

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>