I tried this, and it doesnt appear to be working.
My code...
[tt]
Private Function createFL() As Long
Dim strCMD As String
strCMD = "CMD.EXE dir /o:n /s " & _
strSrchPth & "*.db " & _
"> %TEMP%\SRSDBLst.txt"
Call Shell(strCMD, 0)
MsgBox Err.Description, , Err.Number
End Function
[/tt]
...the strSrchPth is a var defined by a browse
for folder dialog. The strCMD string looks like
this when it is executed...
[tt]
"CMD.EXE dir /o:n /s \\Nwea_1\SRS_Services\Customer\*.db > %TEMP%\SRSDBLst.txt"
[/tt]
To test this out, I typed the command (actually
copy & pasted) into a DOS box, and it worked fine
(removed the CMD.EXE of course).
If I go to Start, Run, and enter the above line
(including the CMD.EXE) it just gives me a DOS
box, but doesnt process the arg.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.