473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 2690

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

Similar topics

2
by: Jon Maz | last post by:
Hi All, To allow myself to make development changes directly on a remote server *without* having to compile on my local dev machine and then upload the dll's to remote, I have created a...
9
by: Doug at SAU | last post by:
I need to run a batch file on a remote machine from an ASP page. I dummied up a test ASP page as follows: <% Set WshShell = Server.CreateObject("Wscript.Shell") wshshell.run...
3
by: emman_54 | last post by:
Hi every one, I am trying to run a batch file using my asp.net application. I am using the Process class to run the batch file. When I run my web application, In the task manager, i could see...
1
by: Uday | last post by:
hi everyone, I searched in faq's but couldn't find and solution... so here I post the popular question.. Env: Win2003 server / IIS6.0 Simple ASP page that runs a batch file. When I run the...
0
by: Elroyskimms | last post by:
I need to execute a batch file via ASP.Net. In my VB.Net code, I'm using System.Diagnostics.Process to call the batch file and its appropriate command line arguments. I'm using...
0
by: RadhakrishnanR | last post by:
Hi, I have created batch file (plz see bellow). This batch file copy the text file from FTP server. I have bellow query: 1. This bellow batch file how to call from VB6.0 application (Not in .Net...
1
by: RadhakrishnanR | last post by:
Hi, How to copy a file from SFTP server to local PC using Batch file. Please consider that SFTP server is installed in Linux OS NOT in Windows OS. i.e. I need Batch file script to do the above...
0
by: Raakish | last post by:
Hello I am trying to use a batch file to run a DTS program that I had created. Below is the Batch File code: REM Type: Batch File REM Created by: Raakish REM Contact: raakish22@gmail.com REM...
2
jamesd0142
by: jamesd0142 | last post by:
Hi, I have a batch file on a remote server. if i use remote desktop to connect to this server and run the batch file it runs as i would expect. However i need to run this batch file from my...
0
by: =?Utf-8?B?UnVzdHlfUm9zZXI=?= | last post by:
Hi everyone, I'm having some issues figuring out how to complete certain tasks with a batch file, whether it be not knowing the right syntax or if it can even be accomplished with a batch file....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.