miguelgfierro / scripts

A collection of useful shell scripts for Linux, Windows & Mac
https://miguelgfierro.com
Other
150 stars 52 forks source link

Check if Import-AzureRmDataLakeStoreItem is faster with -Recurse #11

Open miguelgfierro opened 7 years ago

miguelgfierro commented 7 years ago

https://docs.microsoft.com/en-us/powershell/resourcemanager/azurerm.datalakestore/v2.1.0/import-azurermdatalakestoreitem

miguelgfierro commented 7 years ago

$files = Get-ChildItem -Path $localFolder -Recurse for ($i=0; $i -lt $files.Count; $i++) { $content = $files[$i].FullName Import-AzureRmDataLakeStoreItem -AccountName $dataLakeStoreName -Path $localFolder$content -Destination $adlsFolder$content -Force -Recurse }

I get the error: Import-AzureRmDataLakeStoreItem : The source path 'C:\MS\datasets\luna16_lidcC:\MS\datasets\luna16_lidc\DOI\LIDC-IDRI-0139' does not exist or the current user cannot access it. Ensure the path exists and is accessible and try again.

The problem is in content