- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我错误地创建了一个文件,而且我这辈子都无法删除它。如果你有 7-Zip安装好了,就可以生产了。如果没有,很容易安装。
文件的创建方式如下:
PS C:\temp> mkdir abc
PS C:\temp> cd abc
PS C:\temp\abc> & 'C:\Program Files\7-Zip\7z.exe' a -spf .\DuoWindowsLogon.admx,.\en-us\DuoWindowsLogon.adml
Creating archive: .\DuoWindowsLogon.admx,.\en-us\DuoWindowsLogon.adml
后来,我了解到我应该输入的正确命令是:
& 'C:\Program Files\7-Zip\7z.exe' a abc.7z -spf DuoWindowsLogon.admx en-us\DuoWindowsLogon.adml
意识到错误后,我尝试删除错误创建的目录:
PS C:\temp\abc> ls
d----- 11/15/2020 11:09 PM DuoWindowsLogon.admx,.
PS C:\temp\abc> ls D*
ls : Could not find item C:\temp\abc\DuoWindowsLogon.admx,..
PS C:\temp\abc> ls | rm
rm : Cannot find path 'C:\temp\abc\DuoWindowsLogon.admx,.' because it does not exist.
PS C:\temp\abc> rm *
rm : An object at the specified path C:\temp\abc\DuoWindowsLogon.admx,. does not exist.
PS C:\temp\abc> cd ..
PS C:\temp> rm -recurse abc
rm : Could not find a part of the path 'C:\temp\abc\DuoWindowsLogon.admx,'.
如您所见,没有任何效果。我还尝试了文件资源管理器 (GUI),它也不起作用。如何删除目录?
附言:
我在 CMD 提示符下尝试了“del/s”,它没有产生错误,但文件没有被删除:
c:\>del /s c:\temp\abc
c:\temp\abc\*, Are you sure (Y/N)? Y
c:\>dir c:\temp\abc
11/15/2020 11:09 PM <DIR> DuoWindowsLogon.admx,.
最佳答案
您可以删除以“.”结尾的目录。通过在其前面加上 \\?\
因此,在您的情况下,您可以使用:
Remove-Item `\\?\C:\temp\abc\DuoWindowsLogon.admx,.` -Recurse
此处记录:You can't delete a file or a folder on an NTFS file system volume
You may not be able to delete a file if the file name includes aninvalid name (for example, the file name has a trailing space or atrailing period or the file name is made up of a space only). Toresolve this issue, use a tool that uses the appropriate internalsyntax to delete the file. You can use the "
\\?\
" syntax with sometools to operate on these files, for example:del "\\?\c:\<path_to_file_that contains a trailing space.txt>"
The cause of this issue is similar to Cause 4. However, if you usetypical Win32 syntax to open a file that has trailing spaces ortrailing periods in its name, the trailing spaces or periods arestripped before the actual file is opened.
关于windows - 如何删除 Windows 上以点 (.) 结尾的目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64851490/
C 中的字符串或字符数组必须以空字符结尾才能知道它们在哪里结束。为什么相同的规则不适用于其他类型的数组? 例如。计算机如何知道整数数组在哪里结束?整数/浮点数/ double 数组在内存中的表示方式有
我有一堆文件需要查看。这些文件中的所有行都以 ^M (\x0D) 结尾,但最后一行以 ^M^J (\x0D\x0A) 结尾。 显然,Vim 将文件类型确定为 DOS,效果是文件的整个内容是 显示在一行
以下是来自 Why's Poignant Guide to Ruby Chapter 6 的 Ruby 代码片段,他试图在 Ruby 中演示元编程: # Get a metaclass for thi
我有一个编程问题,希望有人能帮我解决。我正在尝试为一项工作任务学习 C 编程,我为自己设定了一个小项目,其中包括读取文件树,其中包括获取有关每个文件的信息的所有子目录。 我遇到的问题是我的程序不会忽略
其他章节请看: react 高效高质量搭建后台系统 系列 尾篇 本篇主要介绍 表单查询 、 表单验证 、 通知 (WebSocket)、 自动构建
我是 FFmepg 的新手,所以如果术语有误,请原谅我。 我想将文本和音频添加到现有的视频文件中。我链接在一起 2 drawText s,然后在不同的过滤器中,我想合并原始源视频的音轨和一些背景音乐。
使用grep我可以使用以下命令搜索单词的开头和结尾 grep -e '\' 这将找到I have a leg.,但找不到play allegro here。 Ripgrep(0.10.0)似乎不支持
$.ajax({ type:'GET', cache: 'false', url:"/foo/", data:{"id": pid}, success:func
我想在我的 iPhone 应用程序中处理旋转手势并在此期间旋转 imageView。在手势结束时,我想将 imageView 旋转到固定位置。所以,即。如果我将 imageView 从 0 弧度旋转到
我知道检测是一种将跟踪代码动态添加到方法中以启用跟踪和调试的技术。 我想知道这是否只是一个“跟踪”选项,硬编码到 CLR 中以仅添加跟踪代码,或者是否能够向方法添加任何代码? 例如,我想检查某个类中每
我正在查看一些专有源代码:使用库的示例程序。 代码是用 C 和 C++ 编写的,使用 make 构建系统。 每个文件都以注释掉的 [] 结尾:/*[]*/ 源文件和 #[]#对于生成文件。这可能是什么
是否可以循环文件中的每一行并检查它是如何结束的(LF/CRLF): using(StreamReader sr = new StreamReader("TestFile.txt")) { st
我从 JSF 网站的编程开始。目前所有文件都以 .xhtml 结尾。当我去http://localhost:8080/myProject/start.jsf一切正常。但是当我将文件从 start.xh
这是一个多站点问题。我有很多网站都带有.htaccess文件,其中包含多行,类似于: rewriterule ^(page-one|page-two|page-three)/?$ /index.php
真的没有简单的映射来跳转到段落的第一行或最后一行吗? { 和 } 是“独占”命令,因此它们会跳转到段落前后的空行如果有的话,但对于段落的实际第一行或最后一行(即,当段落位于缓冲区的顶部或底部时)。 这
我已经尝试了该站点上所有可能的解决方案。我以前使用过改造,过去已经解决了这个问题,但这次我无法解决。我正在使用 StackOverflow API 来获取问题及其详细信息。 API : https:/
我正在做模式匹配如下。但我没有得到正确的输出。请建议正确的代码以获得正确的输出。 代码 #! /usr/bin/perl -w my $subString = "1.3.6.1.2.1.26.2.1.
如何创建 if 语句以检查整数是否以 0 结尾? 例如,我想要一个这样的 if 语句: var test = 107; //107 is an example it'should some unkno
这个问题已经有答案了: javascript how to tell if one number is a multiple of another (6 个回答) 已关闭 3 年前。 每当秒 var
我正在遍历文件树以识别所有 .DYLIB 文件。 #!/bin/bash #script to recursively travel a dir of n levels function traver
我是一名优秀的程序员,十分优秀!