Occasionally I need to make files in certain folder using python. To minimize the clutter which such files might cause I would like to make them hidden. It's pretty easy to do this using windows explorer but I have to do it manually for every file which my script creates. Is there any way to specify in python that a certain file which was created should be hidden/invisible in windows explorer?
Jump to Post
fn = 'c:\\file.txt' p = os.popen('attrib +h ' + fn) t = p.read() p.close()
All 8 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.