- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试制作一个批处理文件,该文件将删除每个用户配置文件中的一个文件夹。但是当我运行批处理文件时,它会询问“你确定要删除 Y/N 吗?我需要这个文件在没有用户交互的情况下运行,所以有没有办法解决这个问题?即让它自动回答 Y 或完全隐藏 CMD 窗口的方法?
这是我目前所拥有的:
@echo off
REM This will hide the CMD window while the processes are running
REM Input code here to hide CMD window
REM A message to ask the user to save their Outlook emails they have open
mshta javascript:alert("Please be sure to save any emails that you need in Outlook. Click OK to continue.");close();
REM This will stop DM, Email Marker, Email Filer, Interceptor, Papihost, and Outlook.
taskkill /IM DM.exe /F
taskkill /IM DMMarkEmail.exe /F
taskkill /IM EmailAutoBulkFiling.exe /F
taskkill /IM Interceptor.exe /F
taskkill /IM OUTLOOK.EXE /F
taskkill /IM PAPIHost.exe /F
REM This will delete the DM cache in Appdata under the current user
RMDIR /s "%userprofile%\Appdata\Roaming\OpenText\DM\Cache"
REM This will start all of the programs that were closed
REM START DM.exe
REM Commenting the Marker and Filer since some users don't want it
REM START DMMarkemail.exe
REM START Email AutoBulkFiling.exe
REM START Interceptor.exe
REM START OUTLOOK.EXE
REM START PAPIHost.exe
@echo off
提前感谢您的反馈。
*编辑,我去掉了 C:,成功了,感谢 David Candy。
最佳答案
您可以使用“/Q”选项:
rmdir /S /Q "%userprofile%\Appdata\Roaming\OpenText\DM\Cache"
关于windows - 如何回复/避免要求 rmdir 确认?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19688324/
我有一个简单的脚本来创建和删除文件夹,但是当我尝试删除文件夹时,它会出现错误。 代码: 错误信息: Warning: rmdir(../g_test/uploads/) [function.rmdi
本教程将介绍rmdir()函数的使用 新建一个293.php,如图所示: 输入php网页的结构(<?php?>),如图所示: 声明php与浏览器交互的文件类型和编码,如图所
我需要能够删除与任何用户系统的文档文件夹相关的目录。 rmdir: ~/Documents/Folder: No such file or directory 如果我手动输入扩展路径 (/Users/
这个问题与 python 没有直接关系,但我需要在 windows 下的 python32 下工作实现。 从此answer开始我假设使用 shutil.rmtree()在windows下真的很慢(我每
unlink()函数删除文件 、mkdir()函数创建目录、rmdir()函数删除目录 复制代码代码如下: <html> <head> 
我在 .bat 文件中有以下代码: @echo off xcopy /Y /S %CD%\Code\Release C:\Users\%USERNAME%\Desktop\ShareIt /I cls
我有一段代码用于测试目录是否存在,如果存在则删除它,并在其上创建一个新目录。它应该相当简单。 if(is_dir($directory)){ $files = new RecursiveIte
我想要 rmdir/s 的功能,但我需要保留指定的目录。 rmdir/s 删除指定目录之外的所有文件和子目录。 我也尝试过使用 del/s,但随后在指定目录中留下了空文件夹。我也需要删除这些文件夹。
我是 NativeScript 新手,我尝试使用 NativeScript 和 Angular 运行我的 HelloWord 应用程序。我连接了我的 Android 设备,然后运行命令 tns run
我尝试在测试前创建一些目录树并在测试结束后将其删除: require('should'); var fs = require('fs'); var rmdir = require('rmdir');
public function deleteAllEmailRelatedFolders($clientID) { $path = getcwd(); //Delete Email I
QFile 有一个静态函数 bool QFile::remove (const QString & fileName) [静态] 删除指定的文件。这很方便:我们有一个文件路径,我们使用一个命令来删除它
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我正在使用以下代码在 Linux 上删除一个空文件夹: bool removeFolder (const QString& path) { QDir dir(path); assert(d
我在 Windows 10 上使用 git bash,最近更新到 creators update。 每当我尝试在分支之间切换时,我都会得到以下信息 $ git fetch && git checkou
我正在尝试制作一个批处理文件,该文件将删除每个用户配置文件中的一个文件夹。但是当我运行批处理文件时,它会询问“你确定要删除 Y/N 吗?我需要这个文件在没有用户交互的情况下运行,所以有没有办法解决这个
我正在尝试使用 PHP 删除目录。 我从内到外取消链接/删除所有文件/子目录,最后在现在空的顶层目录上调用 rmdir。一切都按计划进行,直到最后一次调用 rmdir。 PHP 警告该目录不是空的并拒
我在提交图像时遇到错误,该进程已在其他程序(如 ADOBE Photoshop)中打开,我无法提交,图像已被删除。 我该如何解决?感谢您的帮助。 最佳答案 您必须停止该文件夹内的任何进程,如果您使用的
我试图了解使用 tar 的正确方法是什么。我有一个名为 main 的目录,在 sub 目录中,它包含一些我想排除的文件和目录。我想删除的所有其他人。我使用的命令: tar --remove-files
最近,我正在使用 SharpSSH 来处理远程文件。 SharpSSH 提供了用于删除远程目录的 rmdir API,但我发现当目录不为空时它会抛出异常并显示消息“Permission denied”
我是一名优秀的程序员,十分优秀!