Just want the number value
i know simple question, else that's still learning powershell
i have script copys gigs of data, exports results csv file and then sends out email when it's complete.
i add number of files copied the outgoing email and thought, simple way count lines in exported csv file. can number of lines in csv with
$filesprocessed=get-content x:\excel\verify-results.csv | measure-object -line
but in email want display number. know there variable go line above return number don't how write - or how search it.
what need return numeric value?
thanks much!
$filesprocessed=(get-content x:\excel\verify-results.csv).count -1
-1 allow header row......
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Windows Server > Windows PowerShell
Comments
Post a Comment