2
I know that you can execute a cmd command through VB.Net, with Shell in VB.NET:
Shell("CMD.exe /c {comando cmd aki}")
However, when you have to use a command like cd to change the directory, it seems not possible with the above code. Explaining better, I want to run a batch file type (.bat), only that do not want to use an external file, I want to use only the application in VB.net for this. I will give an example in a pseudo-code:
Shell("CMD.EXE /c cd C:\LocalPath")
ContinuaShellAnterior("mkdir Locale\")
ContinuaShellAnterior("cd Locale\")
Do you understand? In this case, this code would:
- Access the directory C: Localpath
- Would create a directory within the C: Localpath directory, called Locale
- Would access the directory C: Localpath Locale\
I can understand what I want?
what’s wrong with putting the complete directory when using
mkdir
?– mateusalxd
No, you just don’t have to, because I’ll be inside the directory where I want to create it anyway. :)
– Nickolas Carlos