The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

HOWTO Use PowerShell Invoke-RestMethod to down load all files and subfolders from a specific subfold

John Brumbelow
July 12, 2019

Please help,

How can we issues PowerShell commands to download all files and subfolders from a specific Bitbucket subfolder?
And to be specific, with PURE-100% PowerShell commands that are built in, like Invoke-RestMethod.
The "Curl" is not built in.

Example, if our repo is "https://bitbucket.org/MyOrd/MyRepo/src/master/"
And inside that I have this folder hierarchy:

https://bitbucket.org/FLTMKT/csc/src/master/
- Sub-Folder-A

- Sub-Folder-B
- - Some-File-I-Do-Not-Want.ext
- - MyFile.ext <== I shoudl not get this one.
- - Sub-Folder-B.1
- - - MyFile.ext <== This file name shoule not be overwritten by the others in sub/sub-folders.
- - - My2ndFile.ext
- - - My3rdFile.ext
- - - My4thFile.ext
- - - My5thFile.ext
- - - Sub-Folder-B.1.1
- - - - Sub-Folder-B.1.1
- - - - - MyFile.ext <== This file name shoule not be overwritten by the others in sub/sub-folders.
- - - - - My2ndFile.ext
- - - Sub-Folder-B.1.2
- - - - MyFile.ext <== This file name shoule not be overwritten by the others in sub/sub-folders.
- - - - My2ndFile.ext

- Sub-Folder-C

And I want to copy all files and subfolder from:

https://bitbucket.org/FLTMKT/csc/src/master/Sub-Folder-B/Sub-Folder-B.1

How can I do that with PowerShell.

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
John Brumbelow
July 18, 2019

Anyone able to help?

TAGS
AUG Leaders

Atlassian Community Events