« first day (2996 days earlier)      last day (105 days later) » 

12:03 AM
REFRESH!
[Minesweeper] 97 Games Played. 54 Bombs Used. 11523 Moves Performed. 14 New Users
 
1:02 AM
@FreeMan yep - albeit a bit slowly, but definitely indeed!
 
 
11 hours later…
11:39 AM
@HackSlash Nope, sorry, I don't. SSMS and a smattering of SSIS, but not frequently enough to remember what I did last time :(.
@HackSlash We have PowerBI here at work. I really should start learning it.
 
 
2 hours later…
1:43 PM
:61817021 so far my time has been spent breaking down your code to understand how to use:

Param(
        [Parameter(Valuefrompipeline=$True, Mandatory=$True)] [String]$Directory
    )
as i'm pretty much brand new to scripting in power shell, i'm trying to learn the "why" as I implement. Like you said, it's multiple robocopies in mine compared to one in yours, because i don't seem to understand how $directory is a collection of directories. i'm chalking it up to ignorance on my part, working to correct
I'm slowly making sense of each argument, e.g., "The previous declaration sets the ValueFromPipeline keyword to true so that the Windows PowerShell runtime will bind the parameter to the incoming object if the object is the same type as the parameter, or if it can be coerced to the same type." from the docs page makes sense and helps me understand when/why to use
 
 
2 hours later…
3:52 PM
That is command line parameters. So if the "Function" is a script called `Fast-Delete` then its VBA signature would be:

`Public Function Fast-Delete(ByVal Directory As String)`
We are saying it's mandatory so we get PowerShell to throw errors for us, we don't have to check it was set
The pipeline doesn't make sense in this context because it's just a string that contains a full path but it means you can pipe to it like this:

`"C:\DeleteThisFolder" | Fast-Delete`
Or you can pass it the string normally like this:

`Fast-Delete "C:\DeleteThisFolder"`
 
that example and explanation helped a lot
 
If you actually make a Function in PowerShell, like we did, then you call the function at the bottom of the script. This is because a powershell script can contain functions that are loaded in to the environment. Following this pattern lets us use the function from the script itself
We could remove the function from that script and just run it like a script.
You don't have to write your scripts this way
That is why I'm taking a command line parameter and passing it to the function in the last line
 
so i need to save this script and call it from powershell... i really hate that i didn't figure that out until your vba-example. i only just figured out that $ is used to declare variables in powershell... would have expected var foo = bar like i use in JS
that is also why i had the loop in my original test code to find each directory ($file... which was badly named) that met the requested naming convention, which would then robocopy /mir for each.
baby steps...
and i have it running... thank you, @HackSlash
 
4:11 PM
Sure thing. PROTIP: Use VsCode for writing PowerShell scripts. The language inspections are pretty good. Feels like a proper IDE
You can debug and everything. Shows local variable values at breakpoints
 
nice; i was using ISE for it... and it gave me lots of issues, but that's because i was attempting to run the script with no parameters (F5 in the window I wrote it into), not call the function from the execution line in PS... and led to my rabbithole of reading what every single word in your code meant
 
WARNING: PowerShell behavior changes between versions with breaking changes. If you develop in VsCode it defaults to PowerShell 7 but when you go to run a script you'll find that Windows defaults to PowerShell 5 and the code might not work at all!
 
@HackSlash That's... typically Microsoftian
 
I hate PowerShell for many reasons. The primary one is that you can't Return from a function like you think you can. In powershell, it returns ALL output to the return variable. So if your commands in a function have output and then you try to return a value you're going to see all the output AND the value you wanted to return in the variable.
So despite .NET commands being available in PowerShell, don't expect to just start coding in PS
It's not worth the hassle
I have seen a GUI app written in PowerShell. It's a terrible sight to see
If you're curious what that looks like: github.com/A9G-Data-Droid/nofips-dell-drivers
(Not responsible for eye damage, do not stare directly in to the code)
The GUI is in the DoLocalDriverUpdates.ps1 file
 
4:29 PM
ReadMe: "- This repository is being archived because the latest versions of DCU now support FIPS. You don't need this anymore."
 
4:58 PM
so the powershell robocopy /purge is taking an equivalent time to remove-item via powershell. The assumption by me is this `*Extra Dir -1` means that the robocopy is removing the subdirectories, and the analyzing each file as `*Extra File` is just going one by one, which leads to the actual purging occuring at time of assessment in the execution (not like the analyze in Explorer and then major deletion), which averages 3.1 files/sec removed (includes analyze time).

testing with 1:1 file sizes for those file/sec returns
i'm tempted to use /mir over /purge in my next test. if nothing else i'm getting data
 
5:20 PM
i just posted my results thusfar as comments to the original post on codereview
this is goign to sound disgusting... i think i'm going to use sendkeys to delete these in chunks of 10 ='/
 
If robocopy isn't actually faster and you want to parallelize, please try to use it again with the option for multithreading! /MT:32 I will update my answer to include this
 
will give it a shot; learning all sorts of ways to use robocopy better... i have a .bat file i use to sync using robocopy /mir for templates in a development to production setting, and have never gotten into this nitty-gritty since the size of each directory is so small
 
Allow me to blow your mind: github.com/Cinchoo/ChoEazyCopy
 
5:35 PM
@HackSlash i'm about to slap someone... what i build is much, much less robust, with a userform using fso to pull files/paths. y'all and your years of experience lol
for real though, thanks for that link. that's pretty snazzy and may be getting a download here if i cna get that onto the work device
 
6:09 PM
> Fix for Indenter Bug #6007 .
Comments with colons were evaluated for Indent/Outdent.
 
6:30 PM
@Duga are ya being lazy?
 
[rubberduck-vba/Rubberduck] build for commit 90599835 on unknown branch: AppVeyor build succeeded
 
Nope, just slow...
 
7:17 PM
Oh wow, that's been... damn forever ago.. anyone remembers (from before Rubberduck.Deployment) how to register the add-in? For some reason regasm.exe doesn't seem to suffice, "Rubberduck could not be loaded" is all I'm ever getting with the v3 build 😅
Hopefully it's not the retargeting to 4.8 that screwed it up (i.e. I'm assuming it should be working fine and that I must have messed up somewhere)
I seem to recall that all that was needed was the add-in keys under VBA/VBE, and then to run regasm.exe /codebase /tlb against Rubberduck.dll aka Rubberduck.Main
 
 
3 hours later…
9:57 PM
> Fixes Indenter #5960 .
On ')" - Function Call End - the Alignment got resetted, whereby often the LineConttinuiation '_" was taken as Alignment position.

After that I had to adjust one Test that worked not as intended i think.
 
10:20 PM
[rubberduck-vba/Rubberduck] build for commit 12545234 on unknown branch: AppVeyor build succeeded
 
10:51 PM
 
11:42 PM
[rubberduck-vba/Rubberduck] awb95 pushed commit 76d59f83 to next: Fix Indents on comments
[rubberduck-vba/Rubberduck] awb95 pushed commit 90599835 to next: Add Test for Issue #6007
[rubberduck-vba/Rubberduck] web-flow pushed commit 7082d835 to next: Merge pull request #6008 from awb95/dev-6007-Indenter_comments
[rubberduck-vba/Rubberduck] build for commit 90599835 on next: 97.58% (target 0.00%)
[rubberduck-vba/Rubberduck] 1628 stars vs. [decalage2/oletools] 2170 stars
 

« first day (2996 days earlier)      last day (105 days later) »