Inno Setup 删除文件夹 DelTree
Pascal Scripting: DelTree
function DelTree(const Path: String; const IsDir, DeleteFiles, DeleteSubdirsAlso: Boolean): Boolean;
Deletes the specified directory if IsDir is set to True, or files/directories matching a wildcard if IsDir is set to False. Returns True if it was able to successfully remove everything.
If DeleteFiles is set to True, files inside the specified directory will be deleted if IsDir is True, or files matching the specified wildcard (including those with hidden, system, and read-only attributes) will be deleted if IsDir is False.
If DeleteFiles and DeleteSubdirsAlso are both set to True, subdirectories (and their contents) will be deleted in addition to files.
This function will remove directories that are reparse points, but it will not recursively delete files/directories inside them.
begin
// Delete the directory C:\Test and everything inside it
DelTree('C:\Test', True, True, True); // Delete files matching C:\Test\*.tmp
DelTree('C:\Test\*.tmp', False, True, False); // Delete all files and directories inside C:\Test
// but leave the directory itself
DelTree('C:\Test\*', False, True, True);
end;
Inno Setup 删除文件夹 DelTree的更多相关文章
- PHP遍历、删除文件夹中的所有文件
<?php header("Content-type:text/html;charset=utf-8"); /** * getDirFile 遍历文件夹中的所有文件 * @p ...
- 删除文件夹工具【fuckwinfsdel】,如 node_modules
强力删除文件夹. 安装 npm install fuckwinfsdel -g 使用 fuckwinfsdel youdir 例 fuckwinfsdel node_modules 项目地址 http ...
- linux下删除文件夹的命令
使用rm -rf 目录名字 命令即可 -r 就是向下递归,不管有多少级目录,一并删除-f 就是直接强行删除,不作任何提示的意思 eg 删除文件夹实例:rm -rf /var/log/httpd/acc ...
- python 实现彻底删除文件夹和文件夹下的文件
python 中有很多内置库可以帮忙用来删除文件夹和文件,当面对要删除多个非空文件夹,并且目录层次大于3层以上时,仅使用一种内置方法是无法达到彻底删除文件夹和文件的效果的,比较low的方式是多次调用直 ...
- ios 下创建,删除文件夹的方法
NSString *imageDir = [NSString stringWithFormat:@"%@/Caches/%@", NSHomeDirectory(), dirNam ...
- iOS创建、删除文件夹、获取沙盒路径
1.获取沙盒路径 // 获取沙盒路径 NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent: ...
- 【File】递归删除文件夹中子级文件/夹,并删除文件夹
今天有这样一个需求,需要删除某一个文件夹,但是文件夹中还有子级的文件 或者还可能会有文件夹在里面,所以就需要使用一个简单的递归才能将文件夹删除成功,包括文件夹中的子级文件/夹.!!! 其实很简单,就一 ...
- Linux 删除文件夹和文件命令
inux删除目录很简单,很多人还是习惯用rmdir,不过一旦目录非空,就陷入深深的苦恼之中,现在使用rm -rf命令即可.直接rm就可以了,不过要加两个参数-rf 即:rm -rf 目录名字-r 就是 ...
- Java删除文件夹和文件
转载自:http://blog.163.com/wu_huiqiang@126/blog/static/3718162320091022103144516/ 以前在javaeye看到过关于Java操作 ...
随机推荐
- A 皮呵德
时间限制 : 5000 MS 空间限制 : 262144 KB 问题描述 Eyiz正在与邪恶的Dgdon战斗. 为了打败Dgdon,Eyiz决定召唤PhantasmDragon来帮助他. 但是,召 ...
- CentOS-7.6 下搭建 NIS 服务器
##服务端配置: ####Server: 192.168.0.178(CentOS 7.6) # systemctl stop firewalld # systemctl disable firewa ...
- vagrant 入门案例 - 快速创建 Centos7
中文文档:http://tangbaoping.github.io/vagrant_doc_zh/v2/ 参考: https://blog.csdn.net/yjk13703623757/articl ...
- Level Up - ICPC Southeastern Europe Contest 2019(简单DP)
题意:Steve玩魔兽世界要做任务升两级,任务在你不同的等级给的经验不同,输入任务数量和升第一级和升第二级需要的经验,接着输入每个任务第一级完成给的经验和花费的时间.第二级级完成给的经验和花费的时间. ...
- Java 判断日期的方法
//str:传入的日期 eg:"2018-07-23" function IsDate(str) { arr = str.split("-"); if(arr. ...
- adb工作常用命令
adb devices 查看手机名 adb shell链接手机 dumpsys window windows |grep -i current 打开软件,查看软件入口,和包名,白色为包名,红框为包入口 ...
- CF633(div.2)C. Powered Addition
题目描述 http://codeforces.com/contest/1339/problem/C 给定一个长度为 \(n\) 的无序数组,你可以在第 \(x\) 秒进行一次下面的操作. 从数组选取任 ...
- Scratch 第2课淘气男孩儿
素材及视频下载 链接:https://pan.baidu.com/s/1qX0T2B_zczcLaCCpiRrsnA提取码:xfp8
- 安装python3.8和python2.7
在同一台电脑上同时安装Python2和Python3 目前Python的两个版本Python2和Python3同时存在,且这两个版本同时在更新与维护. 到底是选择Python2还是选择Python3, ...
- Springboot系列(七) 集成接口文档swagger,使用,测试
Springboot 配置接口文档swagger 往期推荐 SpringBoot系列(一)idea新建Springboot项目 SpringBoot系列(二)入门知识 springBoot系列(三)配 ...