Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Removing Directory or File

>>> os.listdir()
['new_one', 'old.txt']

>>> os.remove('old.txt')
>>> os.listdir()
['new_one']

>>> os.rmdir('new_one')
>>> os.listdir()
[]
Source by datatofish.com #
 
PREVIOUS NEXT
Tagged: #Python #Removing #Directory #File
ADD COMMENT
Topic
Name
6+3 =