What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-05 20:25:01
python file hidden
# os module import os # you can use the current directory you are in fileName = "myFile.txt" # or a different one with a path fileName = "C:/Windows/myFile.txt" # send in cmd os.system("attrib +h " + fileName) # +h for hid... Add solution -
Python 2022-02-24 21:35:12
python create directory
# This requires Python’s OS module import os # 'mkdir' creates a directory in current directory. os.mkdir('tempDir') # can also be used with a path, if the other folders exist. os.mkdir('tempDir2/temp2/temp') # 'makedirs' creates a directory with... Add solution -
Python 2021-11-18 22:43:13
create a directory python
# This requires Python’s OS module import os # 'mkdir' creates a directory in current directory. os.mkdir('tempDir') # can also be used with a path, if the other folders exist. os.mkdir('tempDir2/temp2/temp') # 'makedirs' creates a directory with... Add solution -
Python 2021-09-22 03:39:03
os.path.join
# Python program to explain os.path.join() method # importing os module import os # Path path = "/home" # Join various path components print(os.path.join(path, "User/Desktop", "file.txt")) # Path path = "User/Docum... Add solution