Execute COPY from ASP page on server
Hi,
Everytime I execute a specified ASP, I need to update some files to a directory. Is there a way to do that? To run a .BAT file from a ASP file on the server?
I did manage to print a file using:
===
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd /c PRINT c:\TEST\TES.TXT"
Executor.Parameters = ""
strResult = Executor.ExecuteDosApp
Response.Write "<pre>" & strResult & "</pre>"
===
I tried changing it to the next, but no result.
===
Executor.Application = "cmd /c COPY c:\testfiles\*.* m:\newfiles"
===
It doesn´t gives me an error. I see the MS-DOS BOX opening , but it closes directly.
Any help is welcome
David
|