This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upload | |
&{ | |
$ErrorActionPreference = 'Stop' | |
$AWSRegion = "us-east-1" | |
$AWSAccessKeyId = "TODO: Access Key" | |
$AWSSecretAccessKey = "TODO: Secret Access Key" | |
$BucketName = "TODO: Bucket Name" | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null | |
$OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog | |
$OpenFileDialog.ShowDialog() | Out-Null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# references: | |
# https://community.spiceworks.com/topic/380201-using-powershell-to-check-for-new-files-in-a-directory | |
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/register-objectevent | |
# https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher | |
# you can change $p to whatever path you want, you can also add file filters, and add more events | |
# i am monitoring a folder for all create/delete events and color coding output | |
$p = $pwd.path | |
$w = New-Object System.IO.FileSystemWatcher $p | |
$w.IncludeSubdirectories = $true |