Convert .bat command for mapping shared drive to AppleScript To get access to FTP file shares on a windows web server. 

I need to run this batch code. I'm on a MacBook so how do I make it so I can run this sort of code?

net use W: /delete
net use W: \\10.0.2.3\web /persistent:no badPassword /user:office
You can connect to a server just with Finder. From Finder's Go menu, choose Connect to Server (⌘K). Enter the server address as smb://10.0.2.3/web then choose Connect. You'll be prompted for your username and password which can be saved in your Keychain.

If you want to use AppleScript, you can use the following:

tell app "Finder" to open location "smb://username:password@server/share"