; Breakdown of IP address------------------------------------------------------------------------
$1st_octet = LTRIM(SUBSTR(@ipaddress0,1,3))
$2nd_octet = LTRIM(SUBSTR(@ipaddress0,5,3))
$3rd_octet = LTRIM(SUBSTR(@ipaddress0,9,3))
$4th_octet = LTRIM(SUBSTR(@ipaddress0,13,3))
;-----------------------------------------------------------------------
USE G: /DELETE /PERSISTENT
USE P: /DELETE /PERSISTENT
USE Q: /DELETE /PERSISTENT
USE R: /DELETE /PERSISTENT
USE X: /DELETE /PERSISTENT
USE Y: /DELETE /PERSISTENT
USE Z: /DELETE /PERSISTENT
USE Z: "\\srs.com\dfs\documents"
$nul = MessageBox("Z: Mapping attempted to srs.com"+@CRLF+"Error: "+@Error+@CRLF+"Desc: "+@SError,"Use Status",0)
SELECT
CASE $3rd_octet = 0
USE P: "\\srs-edm06\public$"
$nul = MessageBox("P: Mapping attempted to srs-edm06"+@CRLF+"Error: "+@Error+@CRLF+"Desc: "+@SError,"Use Status",0)
CASE $3rd_octet = 1
USE P: "\\srs-nisku01\public$"
$nul = MessageBox("P: Mapping attempted to srs-nisku01"+@CRLF+"Error: "+@Error+@CRLF+"Desc: "+@SError,"Use Status",0)
CASE $3rd_octet = 2
USE P: "\\srs-edmfab01\public$"
$nul = MessageBox("P: Mapping attempted to srs-edmfab01"+@CRLF+"Error: "+@Error+@CRLF+"Desc: "+@SError,"Use Status",0)
CASE $3rd_octet = 3
USE P: "\\srs-edmmod01\public$"
$nul = MessageBox("P: Mapping attempted to srs-edmmod01"+@CRLF+"Error: "+@Error+@CRLF+"Desc: "+@SError,"Use Status",0)
ENDSELECT
IF INGROUP("SRS10104 - FTP")
USE X: "\\SRS10104\FTPROOT"
$nul = MessageBox("X: Mapping attempted to SRS10104"+@CRLF+"Error: "+@Error+@CRLF+"Desc: "+@SError,"Use Status",0)
ENDIF