0

If I replicated a text file message.txt in this case, into a folder 'clone'

import os
os.mkdir("clone")
os.system("copy message.txt clone")

How would I then make the folder 'clone' hidden?

  • On Windows? http://stackoverflow.com/questions/19622133/python-set-hide-attribute-on-folders-in-windows-os – Patrick Haugh Oct 11 '16 at 17:45
  • Also, for moving files and stuff look into `shutil` instead of `system` calls – Patrick Haugh Oct 11 '16 at 17:46
  • Thanks, the code works after a few modifications. The `shutil` module, does that have more functionality that `os.system` commands? – Andr01d_b0t Oct 11 '16 at 17:52
  • It's more for portability. Your code will error out on Unix systems, for example, while `shutil` handles the operating system side of things for you. It's also easier to interact with programmaticlly, because you don't have to make strings of commands. In the end it comes down to preference though. – Patrick Haugh Oct 11 '16 at 17:56

0 Answers0