I am new to AzCopy (working with powershell). Please let me know, is there any way i can find What version did AzCopy is being used on a machine/system.
I tried over Internet, but unable to find any. Please advise.
Thanks,
The following remarks apply to AzCopy v10 and later:
You can get the version number by running azcopy --version
The version number is also output one the first line of every AzCopy log file, and appears in the user agent header that's part of every HTTP request that the tool makes.
Note that version 10 is a total re-write. A v10 installation consists of just the exe file (and, unless someone at your end has deleted it, also a ThirdPartyNotice.txt file). The v10 exe is about 22 MB in size (but the exact size will vary from one minor version to the next). V10 doesn't have an _install_ process. You just download and unzip the zip file and there's the exe.
Contrast that with v8 and earlier, where the exe is only about 144 KB in size, but it has lots of DLLs with it. It gets installed by an installer and goes, usually, to a location like C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy.
Does this information let you do what you need to do?
Oh, one more thing, is that v10 creates logs in a directory called .azcopy that is situated under the users home directory. (E.g. c:\users\jbloggs.azcopy) So if a machine has a directory like that, then you know v10 has been run on it, and you can see exactly which v10 has been run by looking at the first line of the most recent log file inside that directory.
Thank you @JohnRusk. This is really helpful.
I need some help for below queries, Please help.
@EmmaZhu for help on V8 question.
V10 does support remove operations and listing operations. Please see the help message ./azcopy --help.
Hi,
Thanks for your previous replies, which helped me a lot.
Now i am having one more issues as mentioned below.
I created a Powershell script and used azcopy (V8) to copy files from local machine to azure storage.
Ex: C:\ProgramFiles (x86)\Microsoft` SDKs\Azure\AzCopy\AzCopy.exe /Source:$Inputpath /Pattern:$($CurrentFilename) /Dest:$BlobDest /DestSAS:$DestSASToken /s /XO /XN
Now we upgraded AzCopy to V10 and we got a single azcopy.exe file and saved on local drive. Now when ran the below command, i am ending up with error as shown below:
Error:
The term 'azcopy' is not recognized as the name of a cmdlet, function, script fil
e, or operable program. Check the spelling of the name, or if a path was included
, verify that the path is correct and try again
Thanks in Advance.
To run v10 you need to either:
(a) Run it with a command line starting with ".\azcopy.exe" (without the quotes) _when your current directory is the directory that contains the v10 exe_ OR
(b) Add the directory that contains it to your path. For some notes on adding directories to your path see: https://stackoverflow.com/questions/9546324/adding-directory-to-path-environment-variable-in-windows
Note also that you can't use the same command line with v10. V10 is a total re-write and has a different command line syntax. Oh, and importantly, v10 doesn't yet have any directy equivalent to the XO parameter. So that might be a show stopper for you I'm afraid. (At least until we add that capability). OR you might find that v10's "sync" command will do what you need. You'll need to read about sync and decide.
BTW if you don't want to mess around with paths, and would like a GUI, you can use Storage Explorer. It has a preview feature where it can do all its transfers with its own embedded copy of AzCopy. But that still doesn't get you the /XO feature, sorry.
Seems you are running AzCopy v8. Just run AzCopy.exe without any parameter, it will show version info, like following:
AzCopy 8.1.0-netcore Copyright (c) 2018 Microsoft Corp. All Rights Reserved.
Thanks for your valuable time and providing solution.
I have one more query as below:
I have a requirement to delete/remove a particular Blob file from a folder present under a container
Example:
File Name: Sample.txt
Container/Folder : https://****.blob.core.windows.net/SampleContainer/Input/Archive
Is it possible to achieve the above functionality using AzCopy V10 (remove option).
Thanks in Advance,
As far as I know, that is supposed to work. I suggest you create a small test case. E.g. open up Storage Explorer, create a test container, pop a few files in there, and then try to delete one with AzCopy.
I'm marking this issue as closed now because the original question has been answered. If you have any new issues, please raise them under a new issue number.
Thank you for all your response and resolutions :).
Can we use AzCopy tool in a commercial project?
Hi @Ikbal01, the project is licensed under MIT. Please consult your attorney since I cannot provide legal advice.
Thank you @zezha-msft