mpremote copy folder from board to PC

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
User avatar
josverl
Posts: 15
Joined: Fri Nov 24, 2017 4:22 pm

mpremote copy folder from board to PC

Post by josverl » Tue Sep 07, 2021 10:40 pm

Im trying my hand at mpremote , and find it interesting, but run into some issues where I could use some help.

I want to :
1)upload some files
2)import/execute a module
this creates a folder structure with some 50-70 files
3) then download these files

1) and 2) work like a charm

Code: Select all

mpremote cp createstubs.py logging.py :
mpremote exec "import createstubs"
I can't figure out how to copy a folder of files from the remote to local
i would expect that below syntax would work, but this throws an Assertion error

Code: Select all

mpremote cp -r :stubs/ . 
\mpremote\main.py", line 236, in do_filesystem
assert args[-1] == ":"

I think this is https://github.com/micropython/micropyt ... in.py#L247

if i read the code correctly there seems to be a hard block that allows only a recursive copy TO a board, and block a recursive copy FROM that same board.

Questions:
is this assessment correct ?
is there another way to achieve this

Post Reply