Adding multiple comments to multiple folders (not files, folders) #89
Replies: 2 comments
-
Hi. I think what you want is os.walk which will allow you walk a directory tree and handle each directory in the tree. If your comments and folder names are in a text file (maybe consider using CSV) you could then find the corresponding match for each folder and apply the comment. |
Beta Was this translation helpful? Give feedback.
-
Ah ... yeah, OK. I see, didn't know that osxmetadata only would work on a single folder og file. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello all -
I am fairly new to this Python-game, and I've been trying to work out how this stuff works.
Though I get how to add comments to folders, one-by-one, I am fairly certain that it can be done with multiple folders, nested folders, etc. So, if I have a folder structure that goes something like this (I've managed to write code that takes this txt-file and creates all the folders, accordingly);
I also have - and this is where I can't get it to work - another file containing all the comments that I want to add to each folder. They're all in the same order of appearance, and looks something like this;
Here is the code, that I know works, but this only does it to one folder;
As mentioned above, I would love for it to be able to take each created folder, and add a comment from a txt-file, that of course matches the folder structure.
Any help is appreciated.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions