Jump to content

Mount FTP as harddrive


Shevilie
 Share

Recommended Posts

Hey,

I'm looking for a way to mount a ftp site, so it would have a drive letter, and if possible a custom icon.

The real problem is that it should be done automaticly, since I have to do it on a lot of co-workers computers.

(I'm asking for a G-Drive just with the options to put in the company's ftp server) :P

G-Drive img

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

I see your -4 doubt and cast upon you +10 certainty!

http://www.windowsitpro.com/Article/Articl...4486/14486.html

I made an attempt at this. Unfortunately after adding the LMHOSTS entry, running net view returns no entries.

I think you have to have the NetBEUI protocol installed.

Another alternative (Not Free) is WebDrive or Novell NetDrive. Also a program called RedDrive seems similar.

Edited by weaponx
Link to comment
Share on other sites

BTW Here is the code I tried:

$ip = "192.168.1.10"
$lmhosts = @SystemDir & "\drivers\etc\lmhosts.sam"

If FileExists($lmhosts) Then
    FileWriteLine($lmhosts,$ip & " MicrosoftFTP #PRE")
    
    $result = RunWait(@ComSpec & " /c nbtstat -r", @ScriptDir)
    
    $result = RunWait(@ComSpec & " /c net view \\MicrosoftFTP", @ScriptDir)
    
    $result = RunWait(@ComSpec & " /c net use K: \\MicrosoftFTP /user:user", @ScriptDir)
EndIf
Link to comment
Share on other sites

Tried it too... idn't work for me (suspect the NetBEUI is not available atm)

I got

System error 53 has occurred.

The network path was not found.

Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

  • Developers

I doubt my ftp server is even running NetBeui. I definitely don't have it installed on my machine. I run XP Pro but if you are running Vista this might be an option for you http://cybernetnews.com/2007/09/27/cyberno...ive-in-windows/

c'mon guys ... these are two totally different things. You can never ever MAP an FTP server to a drive letter and expect it to work like NetBui works ...

ftp can transfer file ... File Transfer Propocol.. there is no way you can open an file remotely with it.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

c'mon guys ... these are two totally different things. You can never ever MAP an FTP server to a drive letter and expect it to work like NetBui works ...

ftp can transfer file ... File Transfer Propocol.. there is no way you can open an file remotely with it.

Got a point, what should I use instead ... webdav ??

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

You can add a new connection through My Network Places that points to your ftp and create a shortcut that way. You won't get a drive letter though.

Any files you open through this virtual folder will be cached locally before opening, not recommended unless you are working with small files or the ftp is in-house.

I installed RedDrive but it doesn't assign a drive letter either; however, it offers secure options.

Here is another link I found to a program called FTP Drive:

http://www.killprog.com/fdrve.html

Edited by weaponx
Link to comment
Share on other sites

@all

This is a WebDav Example on how to upload.

Maybe you can use it when you change it to download.

$xmlHTTP=ObjCreate("MSXML2.xmlHTTP.3.0") 
 $objStream = ObjCreate("ADODB.Stream")

  $objStream.Type = 1 ; adTypeBinary
  $objStream.Open()
  $objStream.LoadFromFile ("myFile".Value)

$xmlHTTP.Open ("PUT", "myURL",0,"User","Pswd")
$xmlHTTP.Send ( $objStream.Read)

regards

ptrex

Link to comment
Share on other sites

  • 4 years later...

@Ptrex, That example is very useful. I've copied it and adjusted it for my situation. A few notes:

  • The '.value' was not accepted and I removed it.
  • The url needed /filename.ext on the end.
  • It won't upload if the target file exists already.
I need to be able to over-write, or delete. I'm finding examples of xmlHTTP code on the web, but any comments or code appreciated.

Thanks,

Richard

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...