Batch file to mount FTP server in XP?
August 23, 2007 7:40 PM   Subscribe

Is it possible to write a batch file that, when launched, would mount an FTP server as a network place in XP?

So I'm setting up a file server to make use of my 255 (and growing) gigs of unused space on my Dreamhost account. I decided to use FTP over SFTP, SSH, and WebDAV. I will access it in 2 primary ways:

1) From my Macbook, using MacFUSE. Beautiful, elegant, works without a hitch.
2) From lab/library computers at my university running XP. It's easy enough to mount the drive in XP, simply by adding it as a network place (using the ftp://user:pass@server format). It's a bit of a pain to do though, and I'll likely be doing this multiple times a day. I'd like to automate it by reducing the process to a batch file.

My question, then, is how I would do that on the batch file.
posted by charmston to Computers & Internet (6 answers total) 2 users marked this as a favorite
posted by Blazecock Pileon at 7:53 PM on August 23, 2007

I'm pretty sure that when you connect to a ftp site via the Network Places you're not not actually mounting anything as a filesystem, you're just manipulating explorer. Thus the standard windows commandline network filesystem tools (net use) won't be able to do anything.

However you can, from the command-line just jump straight there with:

explorer ftp://user:pass@server

a batch file can do that.
posted by aubilenon at 7:56 PM on August 23, 2007

novell's (abandonware-sorta, and legally free if you can find it) netdrive will mount webdav or ftp as a mapped drive in windows. the newer non-free non-novell webdrive incarnation can also do sftp/ssh.

nb: netdrive has issues with freezing/hanging your entire machine so it may be worth it to search out the newer webdrive version.

in addition, personally I would recommend sftp over ftp (which is horribly, horribly insecure -- user/pass sent in cleartext, not to mention data....). of course, if you have your own ssl cert, webdav can be fairly secure.
posted by dorian at 8:13 PM on August 23, 2007

o, and to automate non-batch type stuff in windows, without delving into vb script or apis or what have you, take a look at auto-it.
posted by dorian at 8:18 PM on August 23, 2007

I decided to use FTP over SFTP, SSH, and WebDAV.

I don't understand how you can use FTP over SFTP or WebDAV. But be sure you are using it over SSH—unsecured FTP can be a good way for other people to steal your password, as dorian said.
posted by grouse at 2:39 AM on August 24, 2007

Seconding NetDrive; I was looking for a similar solution a year or so ago, and it was pretty much the only thing I found that would do the trick of automatically "mounting" an FTP as a drive in Windows Explorer.
posted by Doofus Magoo at 3:57 AM on August 24, 2007

« Older That website where that guy took a lot of drugs.   |   Who pays for a wedding? Newer »
This thread is closed to new comments.