Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

os remove entire folder python

import os
import shutil

os.remove('/your/path/to/file.txt') #removes a file.

os.rmdir('/your/folder/path/') #removes an empty directory.

shutil.rmtree('/your/folder/path/') #deletes a directory and all its contents.
Comment

PREVIOUS NEXT
Code Example
Python :: how to find rows with missing data in pandas 
Python :: change tkinter window name 
Python :: discord.py unban command 
Python :: gdscript string format 
Python :: continue reading lines until there is no more input python 
Python :: split data into training, testing and validation set python 
Python :: python alphabet capital 
Python :: python download file from url 
Python :: cube finder python 
Python :: delete rows based on condition python 
Python :: pycache in gitignore 
Python :: hibernate windows with python 
Python :: yyyy-mm-dd hh:mm:ss.0 python 
Python :: python pdf to image 
Python :: pandas dropna specific column 
Python :: object to int64 pandas 
Python :: df iterrows pandas 
Python :: pyspark date to week number 
Python :: generate a color python 
Python :: how to delete every row in excel using openpyxl 
Python :: python random number between 1 and 100 
Python :: convert column string to int pandas 
Python :: convert negative to zero in list in python 
Python :: # fontawesome install django for free 
Python :: python selenium hover over element 
Python :: python requests set user agent 
Python :: python youtube downloader mp3 
Python :: save and load catboost model 
Python :: pandas uniqe values in the columns 
Python :: how to get the size of an object in python 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =