0

Moved files, go back to folder moved out of ... Creating Fol
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Moved files, go back to folder moved out of ... Creating Fol

by tombalazs on Sun Aug 01, 2021 10:44 am

Okay, I'm on Ubuntu 20. I am creating & moving files using Files, my normal file browser, the default. On the MacroPad I have a folder named "macros". I go inside that, copy all the files (mac-safari.py, etc). I go up a level, and I create a folder named "inactive_macros" and I paste the files there. That seems to have worked fine. I do one press on the MacroPad reset button, it reboots and in Files browser I see that, yes, there is the folder named inactive_macros, but the files have gone back to the "macros" folder, they are not in the "inactive_macros" folder I just moved them to. Why is that?

I opened Double Commander in sudo mode "sudo doublecmd". I did the action described above, and I left three .py macros in the active "macros" directory. Now on the MacroPad I see the message "no macros found" even though there are three macros still in the folder. I'm guessing this has something to do with moving macro files while they are in use on the MacroPad, but I don't know what the solution is. I hope you can help me resolve this problem.
Last edited by tombalazs on Sun Aug 01, 2021 10:59 am, edited 1 time in total.

tombalazs
 
Posts: 5
Joined: Sat Jul 31, 2021 11:12 am

Re: Moved files, go back to folder moved out of ... Creating

by dastels on Sun Aug 01, 2021 10:53 am

Files may not finish up the copy/move. I usually use the command line when dealing with CIRCUITPY, and use sync to force completion:
Code: Select all | TOGGLE FULL SIZE
mv macros/* inactive_macros; sync

It helps to be in the REPL as well so the changes don't kick off a reload.

Dave

dastels
 
Posts: 7243
Joined: Tue Oct 20, 2015 3:22 pm

Re: Moved files, go back to folder moved out of ... Creating

by tombalazs on Sun Aug 01, 2021 12:20 pm

OK I'm in REPL, I used mu.
I'm in a terminal using sudo

I realized that code.py is part of the macros bundle which I downloaded and installed. Since I moved macros, I also need to disable code.py. https://learn.adafruit.com/macropad-hot ... oject-code

Code: Select all | TOGGLE FULL SIZE
/media/tom/CIRCUITPY$ sudo mv code.py code.py.txt
/media/tom/CIRCUITPY$ ls
boot_out.txt  code.py.txt  heatmap.py  inactive.macros  inactive_macros  lib  macros


Reboot MacroPad
Code: Select all | TOGGLE FULL SIZE
/media/tom/CIRCUITPY$ ls

output is empty

Code: Select all | TOGGLE FULL SIZE
/media/tom/CIRCUITPY$ cd ..
/media/tom$ ls
CIRCUITPY
/media/tom$ cd CIRCUITPY/
/media/tom/CIRCUITPY$ ls
boot_out.txt  code.py  heatmap.py  inactive.macros  inactive_macros  lib  macros

code.py.txt reverted to code.py

tombalazs
 
Posts: 5
Joined: Sat Jul 31, 2021 11:12 am

Please be positive and constructive with your questions and comments.