DotNET文件目录常用操作

Windows系统盘瘦身-Dotnet的Nuget缓存迁移 阅读详情

 using System;
using System.IO;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            string path = @"c:/windows/system32/spider.exe";
            string path1 = @"c:/windows";
            string path2 = @"system32/spider.exe";

            //返回目录部分c:/windows/system32
            Console.WriteLine(Path.GetDirectoryName(path));

            //返回文件名spider.exe
            Console.WriteLine(Path.GetFileName(path));

            //返回文件扩展名.exe
            Console.WriteLine(Path.GetExtension(path));

            //返回当前程序集的完整路径
            Console.WriteLine(System.Reflection.Assembly.GetExecutingAssembly().Location);

            //返回当前目录
            Console.WriteLine(Directory.GetCurrentDirectory());

            //合并路径,返回c:/windows/system32/spider.exe
            Console.WriteLine(Path.Combine(path1, path2));

            //判断目录c:/abc是否存在
            if (Directory.Exists(@"c:/abc") == false)
            {
                //创建目录c:/abc
                Directory.CreateDirectory(@"c:/abc");
            }
            //移动目录c:/abc到c:/a目录下
            Directory.Move(@"c:/abc", @"c:/a/abc");

            //删除空目录c:/abc
            Directory.Delete(@"c:/abc");
            //递归删除目录c:/abc
            Directory.Delete(@"c:/abc",true);

            //删除文件c:/abc.txt
            File.Delete(@"c:/abc.txt");

            //拷贝文件c:/abc.txt到d盘
            File.Copy(@"c:/abc.txt",@"d:/abc.txt");

            //移动c:/abc.txt到d盘
            File.Move(@"c:/abc.txt", @"d:/abc.txt");
        }
    }
}

dotnet清除工具 专用于卸载、清除掉计算机中不同版本.NET框架的免费小软件。支持所有语言的.NET。它能删除与.NET相关的文件,并且还能自动将对应的文件夹、注册表项目和Windows Installer文件全部删除。 使用这个软件,基本可以将电脑还原到未安装.NET框架时的状态。因此,当你发现.NET不能正常更新,或是无法删除、甚至于重新安装不起作用时,试试这个小软件 立即下载

相关推荐

DotNetZip压缩单、多文件以及文件夹的DLL

DotNetZip压缩单、多文件以及文件夹的DLL,直接添加到项目了,然后引用Ionic.Zip.dll

.net 开发如何清理C盘

C盘慢了,C盘红了

我的Object Lift 4416

Python实战:超分辨率图像质量评估全攻略——PSNR、SSIM、LPIPS与NIQE的代码实现与优化

本文详细介绍了在Python中实现超分辨率图像质量评估的完整方案,涵盖PSNR、SSIM、LPIPS和NIQE四大核心指标。通过模块化代码设计、多进程并行处理和GPU加速优化,帮助开发者构建高效、可扩展的评估系统,并提供了实战避坑指南与结果解读方法。

weixin_29053073的博客 475

.NET 5 + Docker Jenkins,做自动化部署,全Docker环境。

目录前言Docker Jenkins安装使用Dockerfile创建包含dotnet的Jenkins镜像Dockerfile命令解释构建镜像 name=jenkins:dotnet运行Jenkins:dotnet镜像自动化部署1.创建一个自由风格的软件项目2.配置git3.构建设置4.编写shell脚本自动化远程部署插件安装配置写脚本远程接收结尾 前言 操作系统:Centos 7.9 Docker version 20.10.2, build 2291f61 我希望我的测试服Jenkins能够自动从Git拉

feng005211的专栏 3268

EEG/ERP新手必看:5本神经科学入门书籍推荐(附高清PDF下载)

本文为EEG/ERP研究新手推荐5本神经科学入门书籍,涵盖认知神经科学、数据分析、ERP技术等核心内容。特别推荐《认知神经科学—关于心智的生物学》和《事件相关电位基础》,这些书籍不仅提供理论框架,还包含实用案例和MATLAB代码,帮助研究者快速掌握脑电研究技术。附高清PDF下载,适合实验室小组学习。

weixin_29210727的博客 445

国产信创服务器软硬件兼容情况1 --- ARM架构

信创,即信息技术应用创新产业,它是数据安全、网络安全的基础,也是新基建的重要组成部分...

一只猿的自我修养 4741

dotnet是什么文件夹_EntityFramework Core 运行dotnet ef命令迁移背后本质是什么?(EF Core迁移原理)...

前言终于踏出第一步探索EF Core原理和本质,过程虽然比较漫长且枯燥乏味还得反复论证,其中滋味自知,EF Core的强大想必不用我再过多废话,有时候我们是否思考过背后到底做了些什么,到底怎么实现的呢?比如本节要讲的在命令行简单敲下dotnet ef migrations add initial初始化表完事,如此简洁。激起了我的好奇,下面我们来看看。本节内容可能比较多,请耐心。Entit...

weixin_39590868的博客 5379

基于单片机直流电机调速控制系统设计

*单片机设计介绍,基于单片机直流电机调速控制系统设计。

2201_75940997的博客 2781

C#开发之——Visual Studio安装与配置(1.3)

一 概述 C#的开发工具是Visual Studio,Visual Studio 2019是一款便于学习和使用的开发工具,并且提供了大量的帮助文档供用户参考。本文介绍Visual Studio 2019的安装及安装中的配置 <!--more--> 二 材料 Windows 7(64位) .NET Framework(4.8) Visual Studio 2019(社区版) 三 安装过程 双击Visual Studio 2019进行安装(下载启动所需文件)

我的博客 8782

实战解析:基于Python的APT攻击检测与ATT&CK框架应用

本文通过实战案例,详细解析了如何利用Python编程语言结合MITRE ATT&CK框架,构建一套针对高级持续性威胁(APT)的自动化检测与狩猎系统。文章涵盖了从环境搭建、核心检测逻辑编写、到模块化框架设计与主动威胁狩猎的全过程,为安全从业者提供了可落地的技术方案,以有效应对复杂的网络攻击。

weixin_29044157的博客 389

Synares病毒实战:如何手动清除C盘隐藏的Synaptics.exe(附资源修复脚本)

本文详细介绍了Synares感染型病毒的手动清除方法,该病毒伪装成Synaptics触摸板驱动,感染EXE和XLSX文件。文章提供了从病毒行为分析、母体清除到被感染文件修复的全流程指南,并附有实用的资源修复脚本和防御加固方案,帮助用户彻底清除这一顽固病毒。

lg888的博客 2348

【笔记●避免C盘爆满】Windows 系统开发环境存储路径迁移全规划参考清单

【笔记●避免C盘爆满】Windows 系统开发环境存储路径迁移全规划参考清单

AITechLab 的博客 2371

APM 飞行模式切换--源码详解

APM飞控中有很多种方式可以改变飞行模式。其中最常见的为遥控器切换和地面站切换两种方式。 下面以遥控器切换为例详解飞行模式切换逻辑。 APM遥控器切换飞行模式的源代码在RC_Channel.cpp文件中的RC_Channel_Copter::do_aux_function_change_mode()函数中。 const bool success = copter.set_mode()调用Copter::set_mode()函数,在set_mode()函数中调用mode_fro...

qq_30623591的博客 2440

dotnet常用命令详解

NET CLI 使用 NuGet 来查找项目需要的依赖,如果本地缓存中没找到,则下载它们放到本地缓存中,还原过程中会检测相关依赖的兼容性。nuget locals:命令清除或列出 http 请求缓存、临时缓存或计算机范围的全局包文件夹中的本地 NuGet 资源。所以此命令的场景一般用于在自动化部署的流程中控制执行流程中使用,先在其他命令中使用。run 命令会使用依赖的缓存,所以不建议在生产环境使用此命令运行应用。watch:运行项目在热重载模式下,即监听文件的变更会自动重启项目。

tangPHP的博客 2941

我的世界模组开发——前言

避坑:在开发过程中一定不要过分依赖AI,虽说现在的人工智能很厉害,但是也有很大的弊端,很多AI生成的代码错误百出,还得自己修改,而且像deepseek这种AI的训练数据还停留在一年前,给出的maven仓库地址都是过时的甚至是错误的,开发模组就是要多学习,多看源码,这样开发模组的水平才能越来越高。总而言之,build.gradle文件在我的世界Forge模组开发中扮演了重要的角色,它定义了项目的构建过程、依赖关系和编译选项,为开发者提供了灵活而强大的构建工具。开发工具推荐使用idea,因为可以使用通灵义码。

qq_24992377的博客 2594

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

dotnet命令(不掌握)

dotnet命令

DXB2021的博客 3785

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

dotnet中的counter

打造一个完善的软件产品,准确完整实现业务是第一步,再有就是有优秀的性能,稳定的运行。为了能量化性能指标,需要利用工具,来收集这些数据,以便对产品作出代码级调整。先说一下.net中带一个全局...

dotNET跨平台 859

深度学习工具包 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")

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

[C#]dotnet常用命令

将代码打包到 NuGet 包。Web 项目不可打包。默认情况下,dotnet pack 先构建项目。如果希望避免此行为,则传递 --no-build 选项。此选项在持续集成 (CI) 生成方案中通常非常有用,你可以知道代码是之前生成的。** TargetFramework 的常用值:net45, net48, net6.0, net5.0, netstandard2.1, netcoreapp3.1。按语言过滤,并显示所有列信息。查看解决方案包含的项目列表。将项目添加到解决方案。

FL1623863129的博客 2543

dotnet 常用命令大全

在 .NET 开发中,dotnet命令行接口(CLI)是进行项目创建、构建、运行和发布的核心工具链。

学亮编程手记 143

DotNet - #002 操作MongoDB

操作MongoDB

AlanL的专栏 500

dotnet 命令大全-理论版

最近想用VSCode开发.netCore项目,从零开始学习,先把理论基础熟悉一下。 本篇目录 dotnet? dotnet 选项 项目引用 NuGet 包 NuGet 命令 其他工具 参考文献 dotnet? dotnet 是一款管理.NET源代码和二进制文件的工具,它公开执行特定任务的命令,如dotnet build。每个命令都定义自己的参数。 在每个命令后键入 --help 以访问简要帮助...

weixin_30591551的博客 2292

DOTNET防止反编译

DOTNET防止反编译 目录 第一部分 相关理论 一 防止反编译概述 二 DOTNET编译原理简介 三 被反编译的后果 四 保护方案分类 第二部分 实践 一 Net强名称工具SN.EXE 二 使用Dotfuscator 三 Net加壳与脱壳 第三部分 推荐方案 第一部分 相关理论 一.DOTNET防止反编译概述 作为商用程序,C#如同 java一样,很容易被反编译。甚至VS...

bcbobo21cn的专栏 3367

DotNet 网上资源

相关网站列表http://blog.joycode.com/ 博客堂 主要是微软专家的帖子,内容较新http://www.cnblogs.com/ 博客园http://www.microsoft.com/resources/practices/default.mspx 模式和实践首页http://msdn.microsoft.com/smartclient/ 智能客户端首页http://msdn.

Hacken的专栏 1万+

linux 安装dotnet sdk

以dotnet6.0为例 1.下载linux内核对应的dotnet6.0 sdk文件 进入https://dotnet.microsoft.com/en-us/download/dotnet/6.0

m0_47659279的博客 6389

centos手动安装dotnet-sdk环境和dotnet调试工具

因公司内网和客户的环境,都无法连接yum外网。 上传三个安装包和一个依赖包 官方下载即可: dotnet-sdk-5.0.407-linux-x64.tar dotnet-stack dotnet-trace icu-50.2-4.el7_7.x86_64.rpm (如果icu安装时,还有其他依赖包,需要再下载子依赖包, 下载方法可见 https://blog.youkuaiyun.com/atzqtzq/article/details/122999671) 解压dotnet压缩包 mkdir -p $HOME

atzqtzq的博客 3237

dotNet常用快捷键

dotNet常用快捷键 F4 属性窗口 F5 调试程序 Ctrl+Shift+B 编译程序 F10 逐过程调试 F11 逐语句调试 Ctrl+S 保存 哈,这个Windows上通用 CTL+M+L 展开所有的region CTL+M+O 折叠所有region Ctl+F 查找 F7,设计界...

weixin_34067049的博客 107
上一篇: 一个使用HttpWebRequest类下载指定URL网页的例子
下一篇: 鼠标双击DataGridView单元格变成ComboBox
「已注销」
博客等级 码龄25年 93粉丝 101原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值