Mkdir通过ShellExecute [英] Mkdir through ShellExecute
本文介绍了Mkdir通过ShellExecute的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我想通过外壳执行来运行mkdir命令.如果我运行
Dear all,
I want to run mkdir command through shell execute. If i run
cmd.exe /c mkdir -p "C:\TestFolder"
,它将在C驱动器中创建testFolder.我想通过销售执行来做同样的事情.
但是下面的代码不起作用
it is creating testFolder in C drive. Same i want to do through Sell execute.
But below code is not working
ShellExecute(NULL, _T("cmd.exe /c mkdir -p \"C:\\TestFolder\""), NULL, NULL, NULL, SW_SHOWNORMAL);
ShellExecute(NULL, _T("/c mkdir -p \"C:\\TestFolder\""), _T("cmd.exe"), NULL, NULL, SW_SHOWNORMAL);
任何人都可以说出上述代码有什么问题吗?
谢谢大家.
Can any body tell what is the wrong with the above code?
Thank you all.
推荐答案
ShellExecute(NULL, NULL, _T("cmd.exe"), _T("/c mkdir -p \"C:\\TestFolder\""), NULL, SW_SHOWNORMAL);
这篇关于Mkdir通过ShellExecute的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文