html tool
2022年8月4日星期四
2021年12月22日星期三
转:cmd删除文件夹
参考:https://blog.csdn.net/centralperk/article/details/8603514
rmdir 删除整个目录 好比说我要删除 222 这个目录下的所有目录和档案,这语法就是: rmdir /s/q 222 其中: /s 是代表删除所有子目录跟其中的档案。 /q 是不要它在删除档案或目录时,不再问我 Yes or No 的动作。 要删除的目录前也可以指定路径,如: rmdir /s/q d:\123\abc 这意思是告诉计算机,把磁盘驱动器 D 的123资料夹里面的abc资料夹中的所有东西全部删除,同时也不要再问我是否要删除。
2021年11月4日星期四
cmd递归显示指定目录及其子目录中的全部文件
参考:https://blog.csdn.net/angelazy/article/details/44174663
/S 显示指定目录和所有子目录中的文件
可以在 DIRCMD 环境变量中预先设定开关。通过添加前缀 - (破折号)
来替代预先设定的开关。例如,/-W。
dir x: /a:d 只显示X盘下所有的目录
dir x: /a:-d 只显示X盘下所有的文件
测试效果:
显示c:\windows 及其子目录下的全部文件
dir c:\windows /S /a:-d
2021年10月12日星期二
转:mshta运行vbs,js代码 (在cmd中)
https://m.yisu.com/zixun/404267.html
https://www.cnblogs.com/liaomin416100569/p/9331261.html
mshta vbscript:Close(Execute("GetObject(""script:https://xxx")
JS:
mshta vbscript:window.execScript("alert('hello world!');","javascript")
VBS:
mshta javascript:window.execScript("msgBox('hello world!'):window.close","vbs")
2021年9月26日星期日
2021年5月27日星期四
转:CMD获取当前目录的绝对路径
https://blog.csdn.net/Sagittarius_Warrior/article/details/51516195
- @echo off
- echo 当前盘符:%~d0
- echo 当前盘符和路径:%~dp0
- echo 当前批处理全路径:%~f0
- echo 当前盘符和路径的短文件名格式:%~sdp0
- echo 当前CMD默认目录:%cd%
- echo 目录中有空格也可以加入""避免找不到路径
- echo 当前盘符:"%~d0"
- echo 当前盘符和路径:"%~dp0"
- echo 当前批处理全路径:"%~f0"
- echo 当前盘符和路径的短文件名格式:"%~sdp0"
- echo 当前CMD默认目录:"%cd%"
2021年2月24日星期三
转:cmd中的cat-type
https://superuser.com/questions/434870/what-is-the-windows-equivalent-of-the-unix-command-cat
type
It works across command.com, cmd, and PowerShell (though in the latter it's an alias for Get-Content, so is cat, so you could use either). From the Wikipedia article (emphasis mine):
In computing, type is a command in various VMS. AmigaDOS, CP/M, DOS, OS/2 and Microsoft Windows command line interpreters (shells) such as COMMAND.COM, cmd.exe, 4DOS/4NT and Windows PowerShell. It is used to display the contents of specified files. It is analogous to the Unix cat command.
C:\>echo hi > a.txt
C:\>echo bye > b.txt
C:\>type a.txt b.txt > c.txt
C:\>type c.txt
hi
bye
2018年12月17日星期一
AHK cmd run
https://wapiknow.baidu.com/question/547051459.html?entrytime=1545104073339
SetTitleMatchMode 2
dir=c:\WINDOWS
run,cmd
WinWait, ahk_class ConsoleWindowClass,
IfWinNotActive, ahk_class ConsoleWindowClass, , WinActivate, ahk_class ConsoleWindowClass,
WinWaitActive, ahk_class ConsoleWindowClass,
ControlSend, , cd /d %dir% {Enter}, cmd.exe ; 直接发送到命令提示符窗口.要配合SetTitleMatchMode RegEx或SetTitleMatchMode 2
2018年9月26日星期三
2018年9月25日星期二
转:Browse an UNC path using Windows CMD without mapping it to a network drive
https://superuser.com/questions/282963/browse-an-unc-path-using-windows-cmd-without-mapping-it-to-a-network-drive
问题:
C:\> cd \\somewhere
'\\somewhere'
CMD does not support UNC paths as current directories.
处理方式:
增加nass为本地磁盘处理的
net use x: \\computer name\share name
[popexizhi:
当前的问题,原文推荐的,自己的有nass有user和password , 没有测试通过,这个pushd的使用待进一步研究
pushd will create a temporary virtual drive and get into it.popd will delete the temporary drive and get you back to the path you were when you entered pushd.C:\a\local\path> pushd \\network_host\a\network\path
U:\a\network\path> REM a temporary U: virtual drive has been created
U:\a\network\path> popd
C:\a\local\path> REM the U: drive has been deleted
C:\a\local\path>
]2017年12月19日星期二
2017年12月18日星期一
windows start bat
使用start wait 等待 setupFactory build over
方式:
start ""/wait "G:\Program Files (x86)\Setup Factory 9\SUFDesign.exe" /BUILD "$path\NexusWindows.suf" "/STDOUT" ""
dir H:\pc\work\git_33\output
pause
【popexizhi: 注意start 之后的 “” 和执行结束 也使用“”】
[?] powershell如何调用没测试
2017年10月17日星期二
Setup Factory build in cmd
[popexizhi:
刚刚发现 Setup Factory 可以在命令行build ,官方帮助如下,bela.
]
Command Line Options
/BUILD
"C:\Program Files\Setup Factory 9\SUFDesign.exe" /BUILD "C:\TestProj.suf"
start "" /wait "C:\Program Files\Setup Factory 9\SUFDesign.exe" /BUILD ...