Skip to content

Helpful Azure code snippets

Ryan edited this page Apr 8, 2019 · 1 revision

Copying files and then deleting the old directory This copies everything in the share to another folder within the share according to a pattern. Excludes empty directories, so if you copy to an empty directory, it is excluded.

az storage file copy start-batch --pattern '*' --source-share azureml-filestore-51b61330-67ef-4592-8462-3b2651c2c408 --destination-share azureml-filestore-51b61330-67ef-4592-8462-3b2651c2c408 --destination-path external/

to delete and check with dryrun. For example, we want to get rid of the folder we copied

az storage file delete-batch --pattern 'WBD_National*' --source azureml-filestore-51b61330-67ef-4592-8462-3b2651c2c408 --dryrun
Clone this wiki locally