Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

PowerShell – CSV Columns and Character Count

Posted on May 12, 2015October 26, 2015 By David Kittell
$data = @(Import-Csv .partialFile.csv )
$row = $data[0]

# how many columns do we have?
$row | gm -membertype NoteProperty | Measure-Object

# columns larger than 80 chars
$row | gm -membertype NoteProperty | ? { ($row."$($_.Name)").Length -gt 80 }

Reference: http://stackoverflow.com/questions/8685034/error-importing-5-gig-file-into-table

Originally Posted on May 12, 2015
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PowerShell

Post navigation

Previous post
Next post

Related Posts

Get Number Of Rows Deleted

Posted on August 1, 2013October 26, 2015

DELETE FROM Files WHERE FileID = 1 SELECT @@ROWCOUNT AS DELETED; Originally Posted on August 1, 2013Last Updated on October 26, 2015 All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested…

Read More

Ubuntu / Raspberry Pi – Install NGINX Load Balance DNS

Posted on February 20, 2018

sudo apt install nginx Replace the IP addresses with your IP addresses sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf-original sudo sed -i "/^\s*#/d;s/\s*#[^\"’]*$//" /etc/nginx/nginx.conf && sudo sed -i ‘/^\s*$/d’ /etc/nginx/nginx.conf Modify your config file to look like this user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; } http {…

Read More

Windows Login Page Restriction

Posted on August 19, 2013October 26, 2015

Sometimes you have to restrict the visitor of a page to a username, if you don’t want to take the time to build a database you can simply use the username on the domain. In the code below make sure you replace “<DOMAIN>” with your companies domain protected void Page_Load(object…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes