Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Delete file in python Using the os module

import os
if os.path.isfile('/Users/test/new_file.txt'):
    os.remove('/Users/test/new_file.txt')
    print("success")
else:    
    print("File doesn't exists!")
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Delete #file #python #Using #os #module
ADD COMMENT
Topic
Name
5+4 =