我想知道,在将文件上传到Azure blob容器时,是否可以按日期创建子目录。
例子:目录1:2020Subdirecotry1:05Subdirecotry2:26
目录1: 2020Subdirecotry1: 05Subdirecotry2: 26
先谢谢你
这做到了!你可以使用容器为 "2020"。
#FilePath+TimeDate
$year = (Get-Date -Format yyyy)
$month = (Get-Date -Format MM)
$day = (Get-Date -Format dd)
#Upload
Get-ChildItem -File $FilePath1 -Recurse | Set-AzureStorageBlobContent -Container
$container -Blob $year/$month/$day/ -Context $StorageContext
您可以使用容器作为 "2020",其余部分作为您的blob名称的一部分:"0526blob.txt"
PS:Azure存储没有子容器这个概念。