可以說,我在shell格式多替換命令
"chdir * && whoami.exe >> $$$"
我有這個replacecommand有這個
Dim ReplaceCommand as String = sCommand.Replace("*", UserDirect)
我也希望$$$與選擇的用戶進行更換文件路徑。 我可以選擇文件路徑,但它永遠不會將它放入shell。
我已經試過
Dim ReplaceCommand1, ReplaceCommand2 as String = sCommand.Replace("*" & "$$$", UserDirect & filepath)
Shell("cmd.exe" & ReplaceCommand1 & ReplaceCommand2)
Dim ReplaceCommand as String = sCommand.Replace("*", UserDirect) & ("$$$", filepath)
Shell("cmd.exe" & ReplaceCommand)
也
Dim ReplaceCommand1 as String = sCommand.Replace("*", UserDirect)
Dim ReplaceCommand2 as String = sCommand.Replace("$$$", filepath)
Shell("cmd.exe" & ReplaceCommand1 & ReplaceCommand2)
編輯: 得到一個路徑短的錯誤,當我在shell中使用逗號,而不是&
Dim ReplaceCommand1 as String = sCommand.Replace("*", UserDirect)
Dim ReplaceCommand2 as String = sCommand.Replace("$$$", filepath)
Shell("cmd.exe", ReplaceCommand1 , ReplaceCommand2)
啊謝謝你謝謝 – sealz 2011-05-24 13:28:50