Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Determine the Number of Items Generated by the Split Function?

Hey, Scripting Guy! I know I can use the Split function to split a line into individual items. But how can I tell how many “splits” I ended up with; that is, how many individual items did I generate from a single line?-- SA Hey, SA. For those of you who are relative newcomers to scripting (or those of you who’ve never used the Split ...

Can I Read a Text File From the Bottom Up?

Hey, Scripting Guy! I have a log file in which new data is appended to the bottom of the file; that means the most recent entries are at the end of the file. I’d like to be able to read the file starting with the last line and then ending with the first line, but I can’t figure out how to do that.-- MB, Milwaukee, WI Hey, MB. The...

Feedback usabilla icon