Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

17
is there a [System.IO.Directory]::Enumerate[files/directories] cmdlet out there?
Author Summary
Lee_Dailey is in files/directories
Post Body

tl:dr
reasons against ...

  • not posh-ish [grin]
  • script maintenance in general purpose environments
  • returns a string instead of a fileinfo or dirinfo object
  • [killer negative] the only OnError action is STOP
    this makes it pretty useless in a general purpose environment without custom error handling.
  • doesn't REALLY grab anything until you try to use it [thanks to u/da_chicken]
    returns a "FileSystemEnumerableIterator`1" type that has almost no info until you try to use it. plus, it re-gets that info each time you use it.

reason for ...

  • fast
    100k files on an HDD = 18 seconds for GCI, 5 seconds for SIOD
    [corrected using info pointed out by u/da_chicken]
    100k files on an HDD = 18 seconds for GCI, 0.0005 seconds for SIOD

howdy y'all,

a post by ihaxr got me to playing with SIOD for getting files. for giggles, i timed it compared to Get-ChildItem and it's 44k times faster.

yes, forty four thousand.

here's the post [and code] ...
https://ww.reddit.com/r/PowerShell/comments/5h8smm/need_help_comparing_files_to_listtxt_and_copying/dayv8le/

so now i am wondering if anyone has done a cmdlet using that. perhaps something like Get-FileSysItems. tried searching and found nothing, but that only means my search-fu aint up to snuff.

would some kind person please point me to where someone has done the work - and shared it?

i mean, otherwise i would need to write it myself! eeewwww ... [grin]

take care,
lee

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
27,226
Link Karma
672
Comment Karma
25,727
Profile updated: 5 hours ago
Posts updated: 8 months ago
[grin]

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
7 years ago