I need to change print servers and want to remap the new printers on the ne print server based on the existing printers mapped to the old print server. Sounds simple. I tried using the following from this site:

; "Adding Printers"
if primapstate("\\OldServer\printersharename")
$rc=addprinterconnection("\\newserver\printersharename")
endif
; "Removing Old Printers"
if primapstate("\\oldserver\printersharename")
$RC=delprinterconnection("\\oldserver\printersharename")
endif

This remaps all of the printers in the network to the workstation whether they exist as a mapped printer connection or not. What am I missing here?