Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

Anyone able to help?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in DevOps

Step up your DevOps game webinar Q&A series - Questions answered!

  On October 21st, 2020 we hosted a webinar titled,   Step Up You DevOps Game with 4 Key Integrations for Jira and Bitbucket. We had a great showing and high engagement, but that meant th...

111 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you