471,059 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,059 software developers and data experts.

Run Batch file from asp page on local PC

Hello friends,

I am trying to run batch file from asp page SyncFunc.asp which can be redirected on click event of Submit button, located on Sync.asp page.

My SyncFunc.asp page code is as below,

Expand|Select|Wrap|Line Numbers
  1.       <%
  2.     DIM wShell
  3.         Set wShell = Server.CreateObject("Wscript.Shell")
  4.         wShell.Run "C:\Users\newtest\Desktop\abc.bat"
  5.         Set Shell = Nothing
  6.     response.write("1")
  7.       %>
and abc.bat file code is,

Expand|Select|Wrap|Line Numbers
  1.       ren "C:\Users\newtest\Desktop\abc.Txt" "xyz.txt"
  2.       PAUSE

when i run this it displays "1" on SyncFunc.asp page without error but doesn't perform any affects as per batch file code. so, Plz help me to solve this issue.
Jan 23 '15 #1
0 2387

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Doug at SAU | last post: by
3 posts views Thread by emman_54 | last post: by
2 posts views Thread by jamesd0142 | last post: by
reply views Thread by =?Utf-8?B?UnVzdHlfUm9zZXI=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.