468,505 Members | 1,927 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

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 2174

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
jamesd0142
2 posts views Thread by jamesd0142 | last post: by
reply views Thread by =?Utf-8?B?UnVzdHlfUm9zZXI=?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.