mirror of
https://github.com/paradizelost/Powershell-Public.git
synced 2024-11-25 02:04:43 -06:00
Update teedy.ps1
functional multi-tag add-documents and recursive directory uploading/tagging
This commit is contained in:
parent
480ce4920e
commit
1c2eb8c07d
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user