|
<HTML>
<HEAD>
<META
http-equiv="Content-type"
content="text/html; charset=Shift_JIS"
>
</HEAD>
<BODY>
<%
Response.Write "処理開始<br>"
Set WshShell = Server.CreateObject( "WScript.Shell" )
Set Basp = Server.CreateObject( "Basp21" )
strCommand = "net use z: \\PC名\copy パスワード /USER:ワークグループ\lightbox"
Call WshShell.Run( strCommand,, true )
strTarget = Server.MapPath( "aaa.txt" )
strCommand = "xcopy " & strTarget & " z:\"
Set objExec = WshShell.Exec( strCommand )
Do While objExec.Status = 0
Basp.Sleep 1
Loop
Response.Write "<PRE>"
Do While not objExec.StdErr.AtEndOfStream
Response.Write "エラー:" & objExec.StdErr.ReadAll
Loop
Do While not objExec.StdOut.AtEndOfStream
Response.Write "正常:" & objExec.StdOut.ReadAll
Loop
Response.Write "</PRE>"
strCommand = "net use z: /DELETE"
Call WshShell.Run( strCommand,, true )
Response.Write "処理終了<br>"
%>
</BODY>
</HTML>
| |