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
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.