mirror of
https://github.com/paradizelost/Powershell-Public.git
synced 2024-11-28 19:34:03 -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',
|
$AnchorTag='DirUploadTest',
|
||||||
$Directory='C:\Users\dan\teedytest',
|
$Directory='C:\Users\dan\teedytest',
|
||||||
[switch]$DontUseExistingTags,
|
[switch]$DontUseExistingTags,
|
||||||
[switch]$OnlyCreateTags
|
[switch]$OnlyCreateTags,
|
||||||
|
$Tags
|
||||||
)
|
)
|
||||||
Update-TagHash
|
Update-TagHash
|
||||||
if(-not($taghash[$AnchorTag])){
|
if(-not($taghash[$AnchorTag])){
|
||||||
@ -215,9 +216,9 @@ function Add-Directory(){
|
|||||||
$files = get-childitem -Path $mydirectory.FullName -File | select-object -ExpandProperty FullName
|
$files = get-childitem -Path $mydirectory.FullName -File | select-object -ExpandProperty FullName
|
||||||
if($files.count -gt 0){
|
if($files.count -gt 0){
|
||||||
if((split-path $files[0] -parent) -eq $Directory){
|
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 {
|
} 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