Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2006, 08:08 AM
Authorized User
 
Join Date: Nov 2005
Posts: 72
Thanks: 3
Thanked 0 Times in 0 Posts
Default 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







Similar Threads
Thread Thread Starter Forum Replies Last Post
Call to Server.Execute failed while loading page i_shahid Classic ASP Basics 1 February 21st, 2008 04:48 PM
To execute an exe file from an asp page. sree_mig Classic ASP Basics 0 October 18th, 2005 04:43 AM
execute an .exe file in my server from an ASP page sree_mig ASP.NET 1.0 and 1.1 Basics 0 October 14th, 2005 05:42 AM
How can I execute .exe file from asp.net page suri_thanda ASP.NET 1.0 and 1.1 Professional 4 May 10th, 2005 01:17 AM
Cannot execute ASP in Windows 2003 Server rylemer Classic ASP Basics 1 March 4th, 2005 07:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.