From 1c2eb8c07df9808db091bdd9bfb20ea96fdfaee2 Mon Sep 17 00:00:00 2001 From: paradizelost Date: Thu, 17 Dec 2020 04:10:54 -0600 Subject: [PATCH] Update teedy.ps1 functional multi-tag add-documents and recursive directory uploading/tagging --- teedy.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/teedy.ps1 b/teedy.ps1 index 8e120b9..274ed3c 100644 --- a/teedy.ps1 +++ b/teedy.ps1 @@ -187,7 +187,8 @@ function Add-Directory(){ $AnchorTag='DirUploadTest', $Directory='C:\Users\dan\teedytest', [switch]$DontUseExistingTags, - [switch]$OnlyCreateTags + [switch]$OnlyCreateTags, + $Tags ) Update-TagHash if(-not($taghash[$AnchorTag])){ @@ -215,9 +216,9 @@ function Add-Directory(){ $files = get-childitem -Path $mydirectory.FullName -File | select-object -ExpandProperty FullName if($files.count -gt 0){ if((split-path $files[0] -parent) -eq $Directory){ - New-Document -title $mydirectory.FullName -tag $AnchorTag -file $files + New-Document -title $mydirectory.FullName -tags @($AnchorTag,$tags) -file $files } else { - New-Document -title $mydirectory.FullName -tag $newtagname -file $files + New-Document -title $mydirectory.FullName -tags @($newtagname,$tags) -file $files } } }