stephenpovey
New Member
- Joined
- Dec 19, 2005
- Messages
- 5
Hi, I'm trying to run a bat file from a vba macro. I've used x = shell("AllCopy.bat",1) and it runs but it doesn't do what its supposed to (i.e copy files into folders). please help!
VBA.Shell "cmd.exe /c c:\autoexec.bat", vbHide
Shell "cmd.exe cd \\server\constant dir\constant dir\random dir\random.dir\" purge.bat
Sub t()
ChDir "c:\myfiles\excel"
Shell "cmd /c dir *.* > c:\t.txt", vbHide
End Sub