解决无限创建的子文件夹删除不了的问题

删除win10无限嵌套文件夹 解决由于失误操作导致WIN10系统产生无限循环的文件夹问题 昨天本想自己写一个拷贝文件的小程序,结果出现了点小问题,整出了一个无限循环的文件夹,直接删除出出现错误代码提示,显示无法删除,然后我就去网上找解决方案,找到了如下方案: 使用win10自带的RoboCopy 命令方式,先进入cmd命令行,cd到改文件夹的上一层路径,然后建立一个空的文件夹,比如这里无限嵌套的文件夹名称为WrongFile,在同级目录建立一个文件夹随意命名为RFile,在cmd命令行中执行** Robocopy /MIR RFile 阅读详情

贴个广告

楼主的博客已全部搬迁至自己的博客,感兴趣的小伙伴请移步haifeiWu与他朋友们的博客专栏

能用代码解决的问题都不是问题

  • 废话不多说,直接上代码
/**
 * 解决无限创建的子文件夹删除不了的问题
 * @author wuhaifei
 */
public class ForeverDelete {
    // 删除文件夹方法
    private void deleteDir(File file) {
        if (file.listFiles().length == 0)
            file.getAbsoluteFile().delete();
    }

    // 删除文件方法
    public void deleteFile(File file) {
        File[] temp = file.listFiles();
        for (int i = 0; i < temp.length; i++) {
            System.out.println(temp[i].getName());
            if (temp[i].isDirectory()) {
                if (temp[i].listFiles().length != 0)
                    this.deleteFile(temp[i]); // 如果 文件夹里不为空 递归调用 方法
                this.deleteDir(temp[i]);
            } else {
                temp[i].delete();
            }
        }
    }

    public static void main(String[] args) {
        ForeverDelete m = new ForeverDelete();
        m.deleteFile(new File("F:\\gitBlog\\haifeiwu"));
    }
}
Linux C语言 遍历目录搜索文件的C源程序,支持嵌套目录搜索。 Linux下遍历目录搜索文件源程序以及执行文件,支持嵌套目录,输出目录、子目录和对应的子目录中的文件列表,以及总文件数目。 LINUX下历遍目录的方法一般是这样的:打开目录-》读取-》关闭目录 相关函数是opendir -> readdir -> closedir 这样是不能遍历目录中的所有文件。 //LINUX下目录遍历搜索文件程序,支持嵌套目录 #include #include #include #include #include int do_search_dir(char *path); int do_check_dir(char *fullpath, char* truefullpath); void usage(char *apps); int count = 0; int main(int argc,char **argv) { char fullpath[1024]={0}; if(argc != 2) { usage(argv[0]); return -1; } if( -1 ==do_check_dir(argv[1], fullpath) ) return -1; do_search_dir(fullpath); printf("\nThe total number of files is %d in the directory [%s].\n\n", count , fullpath); return 0; } 。。。。。。 。。。。。。 。。。。。 立即下载

相关推荐

Chroma向量数据库实战:用Python快速搭建本地知识库(附中文诗词检索案例)

本文详细介绍了如何使用Chroma向量数据库和Python快速搭建本地知识库,并附有中文诗词检索的实战案例。通过解析核心概念、数据准备、向量化及智能检索实现,展示了Chroma在处理中文语义搜索时的轻量级与易用性,为开发者构建AI应用原型提供了实用指南。

weixin_29221753的博客 480

电脑文件夹出现无限嵌套直接删除不了如何办?

如果不行,# 设置递归层数上限为 10000,更改上限。gc11下为无线嵌套路径;运行完可以直接删除gc11;

jianqimingtian的博客 1573

USB摄像头开发实战:从参数配置到图像采集的完整流程(Python+OpenCV)

本文详细介绍了USB摄像头开发的完整流程,从参数配置到图像采集,使用Python和OpenCV实现。内容涵盖硬件原理、环境配置、参数调优及高级优化技巧,帮助开发者解决常见问题如分辨率设置、帧率控制和灯光频闪等,提升开发效率。

star的博客 235

删除无限循环的文件夹-删除递归文件夹

最近本人的电脑(Win 7)中某个文件夹出现了无限循环,如下:D:\software\app\note\bin\app\note\bin\app\note\bin\app\note\bin\…… 直接删除或通过rmdir 命令都无法将其删除。会提示源文件长度 解决办法: 假如要删除第一层bin文件夹下的app文件夹。 1. 在该文件夹下新建一个文件夹,如命名为a。 2. Windows键...

weixin_30648587的博客 870

GROMACS自由能景观图绘制全流程:从PCA分析到Origin 3D可视化(附避坑指南)

本文详细解析了使用GROMACS绘制自由能景观图的全流程,涵盖从PCA分析、数据预处理、自由能计算到最终在Origin中进行3D可视化的完整步骤。文章重点分享了数据处理与格式转换中的常见“避坑”指南,帮助研究者从分子动力学轨迹中有效提取并解读构象自由能信息,深化对生物大分子动力学过程的理解。

oauth7security的博客 309

MATLAB点云处理总目录

点云处理研究学习

weixin_44329757的博客 2560

win10 删除无限嵌套文件夹方法

问题:        由于操作失误,导致win10下产生了一个几乎无限循环嵌套的文件夹,用各种文件粉碎机都不能删除。 解决:       1. 在无限嵌套的文件夹(名称:WrongFile)同层路径下,建立一个空的文件夹,名为EmptyFile;       2. 在cmd命令行中执行 Robocopy /MIR EmptyFile WrongFile 原理分析:        Rob...

Yummy 7033

Unity Sprite Atlas C++底层原理全解析 —— “像素聚合工厂”的秘密

Unity Sprite Atlas C++底层实现简析 Sprite Atlas是Unity中用于优化2D渲染性能的核心机制,其C++底层实现如同一个高效的"像素聚合工厂"。该系统通过将多个小纹理合并为一个大纹理,显著减少Draw Call次数和GPU纹理切换开销。 在数据结构上,底层采用SpriteAtlasData存储图集元数据,PackedTexture管理合并后的大纹理,SpriteFrame记录每个子精灵的位置信息,并通过哈希表实现快速查找。编辑器阶段使用最大矩形等算法优化空

本博客聚焦游戏开发技巧、创业实战心得及大学热门课程干货。这里既有技术深度,也有思维广度,无论你是开发者、创业者还是高校学子,都能在这里找到适合自己的成长之路! 206

删除无限创建的子文件夹

文件夹无法删除,并且显示错误代码:0x80070091。

weixin_44022057的博客 520

AMBA总线协议(5)——AHB(三):猝发传输

在本文中我们展现了AHB猝发传输的具体细节,学习了猝发的类型和具体传输方式,着重讲解了四拍回卷猝发,猝发是AHB传输中非常重要的一部分。

apple_53311083的博客 3646

CLRNet车道线检测模型在Orin Nano Super开发板上的全栈部署与优化实践

本文详细介绍了将CLRNet车道线检测模型部署到NVIDIA Orin Nano Super开发板的全过程。内容包括:1) Orin开发板硬件规格分析;2) JetPack SDK环境配置与Python虚拟环境搭建;3) CLRNet模型架构解析与PyTorch实现;4) 模型转换与TensorRT加速优化方法。通过系统性的环境配置、模型转换和性能优化,为边缘计算场景下的车道线检测应用提供了完整的解决方案,实现了在Orin平台上的高效部署。

huanghm88的专栏 228

删除无限嵌套文件夹

起因 正在学习计算机网络的知识,用Typora做笔记,突然感觉电脑变卡,连浏览器都打不开,打开任务管理器发现Typora的CPU占用率高达50%,发现不正常。一开始还以为是Typora的问题,后来发现,我的笔记文件,“计算机网络.md”放在了桌面上,其对应的资源文件“计算机网络.assets文件夹”也放在了桌面上,而这个文件夹里面多了一个叫Desktop的文件夹,哦豁完蛋,无限嵌套了,大致结构如下: 计算机网络.assets\Desktop\计算机网络.assets\Desktop\计算机网络.assets

Warnem的博客 1704

816华为OD机试真题 新系统 - 电池充电时间计算 (Java/Py/C/C++/Js/Go)

816华为OD机试真题 新系统 - 电池充电时间计算 (Java/Py/C/C++/Js/Go)

算法大师! 479

File类创建文件夹时,出现死循环、无限嵌套创建子文件夹,且创建的文件夹无法删除...

我在用File类创建文件夹时,出现死循环、无限嵌套创建子文件夹,且创建的文件夹无法删除。  关键代码如下: public void copy(File f) throws IOException {  String  s2, s3, s4;  File file = new File(f1);  File file2 = new File(f2);  if (file.isDirectory(...

梦幻衣园 1335

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

解决无限嵌套文件夹无法删除的问题[WIN10]

问题: 由于使用某软件时使用不当,造成在win10系统环境下生成了一个几乎无限嵌套的文件夹,无法通过删除文件夹的方式删除掉这个无限嵌套的文件夹。解决办法: 使用win10自带的RoboCopy 命令方式,先进入cmd命令行,cd到改文件夹的上一层路径,然后建立一个空的文件夹,比如这里无限嵌套的文件夹名称为WrongFile,在同级目录建立一个文件夹随意命名为RFile,在

周益龙的专栏 7177

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

win10 删除无限嵌套文件夹

记录一下,win10无限嵌套文件夹的删除方法

PinocchioYang的博客 952

解决文件夹无限嵌套无法删除的问题---最新办法

解决文件夹无限嵌套无法删除的问题---最新办法

p15097962069的博客 1188

删除win10无限嵌套的文件夹

删除无限嵌套文件夹

weixin_44044858的博客 701

删除无限递归文件夹。

无限递归文件夹通常由于程序错误或恶意软件创建,导致文件夹结构无限嵌套,常规删除方法可能失效。以下是几种有效删除无限递归文件夹的方法,涵盖不同操作系统和编程语言实现。模块提供高效的文件操作支持。某些情况下,文件夹权限可能阻止删除。在Linux或macOS中,在Windows系统中,

IIk_7454的博客 434

如何快速删除无限嵌套文件夹

如何快速删除无限嵌套文件夹,一文解决

m0_73731267的博客 726

解决无限嵌套文件夹无法删除的问题[WIN10] | 无法删除嵌套文件

不当操作,导致文件错误,奇葩文件无法正常删除

m0_45696900的博客 2014

WIN10删除无限嵌套文件夹(错误0x80070091 目录不是空的)

若方案二、三、四均无效,或在执行过程中出现文件名或扩展名过长,导致文件夹无法删除或者命令中断等情况,一般是嵌套文件夹的名字过长且嵌套的层级较多导致的,此时可以使用下面的py程序来自动将所有嵌套的文件夹名改为1,然后再次执行方案四即可。注意该代码默认每个文件夹下只有一个文件夹,没有其他文件,各位可以根据实际情况调整代码,目的是使每个文件夹的名称变短,从而能够访问到最里层的文件夹。嵌套文件夹的层数不是很多时,可以手动进入最里层的文件夹新建一个任意文件,然后退到最外层文件夹就可以正常进行删除。

Ucyanwind的博客 3132

【已解决】源文件名长度大于系统支持的长度问题

无聊中,想写个.Java文件为后缀名的编码格式转换器,用途:如果从网络下载下来的源码,或者同事给你他写好的代码,Copy到Eclipse工程中出现乱码的问题,这是Eclipse就会报错,当你打开报错的指定文件代码,里面凡出现中文的地方就会出现乱码,当我们查看文件的编码方式,它是utf-8,我们需要将它改成ANSI,如果项目中的类非常的多,一个个用记事本打开源文件,点击文件,另存为命令,“编码”改为

wangsq08的博客 1万+
上一篇: Maven安装教程
下一篇: Hexo下Next主题配置与优化
whfstudio
博客等级 码龄10年 12粉丝 46原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值