Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

delete all files in a directory cmd

del /S C:Path	odirectory*
Comment

delete all files in a directory command

rd /s/q Foldername
Comment

delete all files in directory windows

import os
# For Current Directory
for root, dirs, files in os.walk("/"):
	for file in files:
	os.remove(os.path.join(root, file))
Comment

delete all file inside folder

import os, re, os.path
mypath = "my_folder"
for root, dirs, files in os.walk(mypath):
    for file in files:
        os.remove(os.path.join(root, file))
Comment

PREVIOUS NEXT
Code Example
Shell :: git checkout branch 
Shell :: install docke machine 
Shell :: git untracked folder 
Shell :: pushing existing project to github 
Shell :: how to execute a bash script in terminal 
Shell :: uninstall cinnamon 
Shell :: ubuntu locate binary file 
Shell :: how to install specific package version npm 
Shell :: bash list all files in directory and subdirectories 
Shell :: openssl verify cert 
Shell :: pull a specific branch from github 
Shell :: powershell import module 
Shell :: git show unpushed commits 
Shell :: gulp-gzip 
Shell :: displaying the last line of output bash 
Shell :: how to merge branches github 
Shell :: clone at a given commit github 
Shell :: linux format disk fat32 
Shell :: how to format usb to fat32 ubuntu 
Shell :: wsl start distro 
Shell :: how to make NTFS read only file system writable in linux 
Shell :: run disk usage analyzer as root 
Shell :: remove directory from linux 
Shell :: bash for interval 
Shell :: download office 365 for ubuntu 
Shell :: composer install on mac 
Shell :: error when i install sass 
Shell :: git credentials store with timeout 
Shell :: sed delete line before match 
Shell :: step10 pgadmin ubuntu 20.04 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =