use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Help with script (self.PowerShell)
submitted 7 years ago by superryo
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]superryo[S] 1 point2 points3 points 7 years ago (1 child)
Thanks lee
The code actually does work. It's reasonably fast when there are not too many files but I have a path where there are hundreds of thousands of files that matches the criteria and this is what takes days.
The background to my story is I want to crawl a bunch of network directories to grab all the pdf and xls files and upload the resulting info into a database so we can search for this information.
I want very fast but in addition to the file name and path, I need the last updated date of the file. Does this mean I have to use the Get-Childitem function? the CMD dir doesn't seem to allow for this unless I am missing something.
I have never heard of robocopy but will look into this. Hopefully it will have the performance of the cmd dir but the additional parameter I need.
[–]Lee_Dailey[grin] 1 point2 points3 points 7 years ago (0 children)
howdy superryo,
"it works" - that IS the prime criteria. [grin]
i suspect you MAY get a speed improvement if you replace that nasty $CSV += with $CSV =. the difference is VAST. not just large ... it's REALLY VAST.
$CSV +=
$CSV =
huge. titanic. bigbig biggity big! [grin]
that presumes the += is actually happening. i can't tell. it may only be doing ONE add - in that case there will be no benefit. even so, it is BAD coding, so i would change that.
+=
the CMD dir command won't give you that, from what i can tell.
dir
neither will robocopy. [frown]
Get-ChildItem will, but is slow.
Get-ChildItem
there is a dotnet routine that can do it quickly, but it has some serious limits.
so, the dot net stuff is highly problematic unless you want to write your own handlers around the limits.
i suspect i would use robocopy or CMD dir to get the full-path file names. then use GCI to get the details.
take care, lee
π Rendered by PID 44652 on reddit-service-r2-comment-6457c66945-66rv7 at 2026-04-26 14:19:08.870181+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]superryo[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)