Advertisement

05.13.2008 at 06:45AM PDT, ID: 23397709
[x]
Attachment Details

batch file to copy images to live server

Asked by newbie27 in Active Server Pages (ASP), Windows Batch Scripting, VB Script

Tags: asp,vbscript,.bat

Hello Experts,
I am trying to call a .bat file on the ASP page  to copy images to the live server, I have managed to write one but would need your experts advice whether it is ok as I cant test it on the dev server.
The script I have will mapped to some drive on the server which I wants to change it. if the drive has already been mapped on the server then the script will fail.
Your help is much appreciated.
Regards
samStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
@echo off
REM 2008-05-12
REM Script to copy images across to another server
echo.
 
date /t >"E:\logs\XCOPY.log"
time /t >>"E:\logs\XCOPY.log"
 
echo Copying Images using XCopy ... >>"E:\logs\XCOPY.log"
 
echo Check log file: [E:\logs\XCOPY.log]
 
net use \\BD2\E$ /USER:username password  >>"E:\logs\XCOPY.log"
 
xcopy "E:\www\sitename\images*.*" "E:\www\sitename\images" /S /F /R /Y /D /I
 
echo Deleting drive >>"E:\logs\XCOPY.log"
 
net use \\BD2\E$ /delete >>"E:\logs\XCOPY.log"
 
echo Script finished
 
pause
[+][-]05.13.2008 at 06:45AM PDT, ID: 21554957

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 10:16AM PDT, ID: 21557162

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), Windows Batch Scripting, VB Script
Tags: asp,vbscript,.bat
Sign Up Now!
Solution Provided By: sungenwang
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628