Do someone know how to list every file in a directory inside data lake store and sub directories? apparently the -recursive
instruction does not work as it does in a normal environment
I need to run this script in Azure Data Lake Store, (which runs properly in my computer)
$Quarentine = "C:\PSTest\QUARENTINE"
$validate = "C:\PSTest\Files"
get-childitem $validate -rec -af | Where-Object {$_.FullName -notmatch "^C:\\PSTest\\Files\\(.+\\)*(XX.+)\.(.+)$"} |
move-item -destination {"C:\PSTest\QUARENTINE\"+ $_.BaseName +("{0:yyyyMMddHHmmss}" -f (get-date)) + $_.Extension}
I am working with the command Get-AzureRmDataLakeStoreChildItem
where apparently -recursive
is not supported.
Can someone help me please?
Thanks
Here's a recursive way to do it (caveat: it doesn't scale well as it makes an API call for each sub-directory and is not parallelized, and because it stores all files into memory).