How to identify text files with zero value
2 vues (au cours des 30 derniers jours)
I have 10 text files and each text file has 9 rows and one column. In some text file total column is zero. Like
In other file there are zero values and numbers. Like
I want to extract text files with total column of zero values
If there is any way to extract the text files
dpb le 17 Avr 2023
Déplacé(e) : dpb le 17 Avr 2023
"...is any way to extract the text files[?]"
What do you mean by "extract", precisely? What is the end result you're after; to read the data files that actually contain one or more nonzero values, identify which files are those that contain only zero values, ...?
The answer to all of those will be based on simply reading each file in turn and testing the content something like
d=dir('*.txt'); % substitute suitable wildcard for your case to identify wanted files
%...do what need to do for those with some nonzero values here
%...and all zeros here...