Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to add values in TXT files

$
0
0

I have a directory full of text files with one number.  Ideally, I'd like to add all the values together and get some output.  But

I'll accept putting all the values into one file so I can do the math manually.  Text file looks like this:

User.txt
4.50MB

I'd like it to look like this:

UserTotal.txt
4323.55 MB

Or

UserTotal.txt
4.50 MB
10.50 MB
1024.20 MB
...
There are over 200 txt files so doing this procedure manually would be rather annoying.  Any suggestions on how I would approach this scenario?



Dmox


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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