Private Sub Form_Click ()
Shell (dir "d: \ *. Exe/a - d/b/s & gt; C: \ 1. TXT ")
End Sub
In the code above, CMD running normally, but in the VB pop-up "file not found" prompt, what's the problem?
CodePudding user response:
Very normal, the shell is not running Windows, and some string handling problematic, so the common practice is to put the need to perform a DOS command output to a bat file, and then call the bat in the shell