PowerShell: Copy Directory Structure and a Random Sample of Files from Each Directory

I got my wife a new digital picture frame as a present.  It looks cool but the attached storage options (USB or card) aren’t big enough to take all our digital photos.

The decision about which pictures to include relies on either organisational skills OR an artistic eye, neither of which I have.

So what about making it strictly random?  Copying the entire directory structure but only a random sample of the files in each folder?

That I CAN do 🙂 Continue reading “PowerShell: Copy Directory Structure and a Random Sample of Files from Each Directory”

PowerShell : Find all Files Owned By A User

The Windows 10 release is just around the corner and I’m going to do a fresh install on a new hard-drive.  I’ve redirected most of my working directories to network locations so most of my files should just appear ‘auto-magically’ but I’m sure there’s a few files dotted around the place that are important that I’ve just ‘temporarily’ left outside one of the redirected folders.

So what I want is some PowerShell to find all the files owned by me on my hard-drives.  I can do this with a one-line PowerShell command as follows; Continue reading “PowerShell : Find all Files Owned By A User”