Skip to content

Instantly share code, notes, and snippets.

@ralf-br
ralf-br / azure_move_files.sh
Last active May 6, 2021 08:51
Azure File Storage: Move a large quantity of files from one folder to another (on the same fileshare)
#!/bin/zsh
# Works in zsh-shell on Mac.
# Requires azcopy (https://formulae.brew.sh/formula/azcopy) and az (https://formulae.brew.sh/formula/azure-cli#default)
# As there is no move we copy and rm the files. (The copy is blocking so the remove will not be executed on failure)
export ACCOUNTNAME=xxxx
export ACCOUNTKEY='xxxxxxayyyyyyyyyyyyyyy=='
export FILESHARE=fileshare
export PATHFROM=path/from/*
export PATHTO=path