自动压缩日志文件夹并删除_自动清除并删除空文件和文件夹

自动压缩日志文件夹并删除

自动压缩日志文件夹并删除

00_lead_image_empty_folder_orig

After cleaning out files on your hard drive, you may be left with a bunch of empty folders you want to delete. Rather than finding them manually, wouldn’t it be easier to use a tool that can find them for you and delete them?

清除硬盘驱动器上的文件后,可能会留下一堆要删除的空文件夹。 与其手动找到它们,不如使用一种可以为您找到并删除它们的工具更容易吗?

We found a free tool, called Delete Empty, that searches a specified path for empty folders and empty files (files of size zero) and deletes them, deepest paths first. For example, in the following structure, Folder2 is currently not empty, but will become so once EmptyFolder1 and EmptyFolder2 are deleted. Delete Empty will delete EmptyFolder1 and EmptyFolder2 and then discover that Folder 2 is now empty and delete it.

我们找到了一个名为“删除空”的免费工具,该工具在指定的路径中搜索空文件夹和空文件(文件大小为零),然后删除它们,最深的路径先删除。 例如,在以下结构中,Folder2当前不为空,但是一旦删除EmptyFolder1和EmptyFolder2,它将变为空白。 删除空将删除EmptyFolder1和EmptyFolder2,然后发现文件夹2现在为空并将其删除。

c:\Folder1\Folder2\EmptyFolder1

c:\ Folder1 \ Folder2 \ EmptyFolder1

c:\Folder1\Folder2\EmptyFolder2

c:\ Folder1 \ Folder2 \ EmptyFolder2

Delete Empty (DelEmpty.exe) is a command line tool, but it’s very quick and easy to use. To use it, open a command line window. The easiest way to do this is to shift-right-click on the folder containing the DelEmpty.exe file and select Open command window here from the popup menu.

删除空白(DelEmpty.exe)是一个命令行工具,但是它非常快速且易于使用。 要使用它,请打开命令行窗口。 最简单的方法是在包含DelEmpty.exe文件的文件夹上单击鼠标右键,然后从弹出菜单中选择“打开命令窗口”。

01_open_command_window_here

A command line window opens directly to the folder containing the Delete Empty executable.

命令行窗口直接打开到包含Delete Empty可执行文件的文件夹。

The format for the Delete Empty command is as follows:

删除空命令的格式如下:

DelEmpty.exe OPTIONS [PATH]

DelEmpty.exe选项[路径]

The following OPTIONS are available for use in the command:

以下选项可在命令中使用:

-fdelete files of size zero
-ddelete empty directories
-vverbose mode
-cconfirm mode (Shows what was deleted)
-sinclude sub-directories
-llist what would be deleted (lowercase L – does not actually delete the empty folders or empty files)
-ydelete without (y/n) prompt
-F 删除大小为零的文件
-d 删除空目录
-v 详细模式
-C 确认模式(显示已删除的内容)
-s 包括子目录
-l 列出要删除的内容(小写的L –实际不删除空文件夹或空文件)
-y 不带(y / n)提示删除

For example, to delete empty directories and empty sub-directories in the mydata directory on C:, type the following command on the command line and press Enter.

例如,要删除C:上mydata目录中的空目录和空子目录,请在命令行上键入以下命令,然后按Enter。

DelEmpty.exe -d -s c:\mydata

DelEmpty.exe -d -sc:\ mydata

02_deleting_empty_folders_and_subs

If you want Delete Empty to prompt you before deleting each empty directory and empty sub-directory, add the -y option to the command, as follows.

如果要“删除空”在删除每个空目录和空子目录之前提示您,请向命令中添加-y选项,如下所示。

DelEmpty.exe -d -s -y c:\mydata

DelEmpty.exe -d -s -yc:\ mydata

03_deleting_empty_folders_and_subs_wo_prompt

To delete all the empty files, in addition to the empty directories and empty sub-directories, add the -f option to the command.

要删除所有空文件,除了空目录和空子目录外,还应在命令中添加-f选项。

DelEmpty.exe -d -s -f c:\mydata

DelEmpty.exe -d -s -fc:\ mydata

04_delete_zero_size_files

If you want to check what directories and files would be deleted before actually deleting them, use the -l (lowercase L) option. For example, the following command will show you what directories, sub-directories and files will be deleted in the mydata directory.

如果要在实际删除目录和文件之前先检查要删除的目录和文件,请使用-l(小写L)选项。 例如,以下命令将向您显示mydata目录中将删除哪些目录,子目录和文件。

DelEmpty.exe -d -s -f -l c:\mydata

DelEmpty.exe -d -s -f -lc:\ mydata

05_list_of_what_will_be_deleted

You can also choose to have Delete Empty show you what has been deleted. To do this, add the -c option to the command.

您也可以选择让Delete Empty显示已删除的内容。 为此,将-c选项添加到命令中。

DelEmpty.exe -d -s -f -c -y c:\mydata

DelEmpty.exe -d -s -f -c -yc:\ mydata

06_show_what_was_deleted

To close the command window, type “exit” (without the quotes) on the command line and press Enter.

要关闭命令窗口,请在命令行中键入“ exit”(不带引号),然后按Enter。

07_closing_command_window

Download Delete Empty from http://www.intelliadmin.com/index.php/downloads/. The program is available in the Free Utilities section.

http://www.intelliadmin.com/index.php/downloads/下载删除空。 该程序位于“免费实用程序”部分。

This handy free tool should help you keep your hard drive free of extraneous directories and files. However, be careful when using the Delete Empty tool. Some programs may need empty folders to run correctly, so be sure not to delete anything you are not sure of.

这个方便的免费工具应该可以帮助您使硬盘驱动器上没有多余的目录和文件。 但是,使用“删除空白”工具时要小心。 某些程序可能需要空文件夹才能正确运行,因此请确保不要删除不确定的内容。

翻译自: https://www.howtogeek.com/122294/automatically-clean-out-and-remove-empty-files-and-folders/

自动压缩日志文件夹并删除

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值