I have a script that net send's a message that something is happening. I do not want the user to be able to click OK or close the alert or anything until the event has happened. Is there a way to have a yes/no type thing, like vbYesNo, using net send? Here's how it is used in my .cmd script:
@echo off
ftp -s:ftp-ls.scr
ftp.host.com > %temp%\ftp-ls.tmp 2>&1
find /i "FromOffice.mdb" "%temp%\ftp-ls.tmp"
If "%errorlevel%" == "1" (
Net Send %computername% You Already Have The Most Current Data File. No File Was Downloaded.
Goto End
)
Net Send %computername% Now Downloading The Most Current Data File.
ftp -s:ftp-get.scr
ftp.host.com > NUL
copy C:\mdb_download\FromOffice
.mdb C:\FromOffice.mdb
Net Send %computername% Download Complete.
:End
del %temp%\ftp-ls.tmp
I could hve it check sizes to verify if the file is the same to make sure it has the latest file...?
'===============Cut-N-Past
Option Explicit
On Error Resume Next
Dim WshShell, FSO
Set FSO = CreateObject("Scripting.Fi
Set WshShell = CreateObject("WScript.Shel
msgbox "File transfer inprogress, click ok and wait for Next Message",1
WshShell.Run "ftp -s:c:\scripts\workarea\ftp
IF FSo.fileexists("c:\fromoff
msgbox "File transfer complete",1
End If
Set FSO = nothing
Set Wshshell = nothing
'===============Cut-N-Past
Code inside something like this:
ftp.scr
'===============Cut-N-Past
open ftp.yourserver.com
username
password
cd mdb_download
get FromOffice.mdb C:\FromOffice.mdb
bye
'===============Cut-N-Past