Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Command line program Windows

Options
  • 17-12-2010 3:18pm
    #1
    Registered Users Posts: 1,086 ✭✭✭


    I have a program on my linux machine I can run from the command line to mount an remote folder (my web directory on my shared hosting) over ssh. It then copies a file over locally unzips it and inserts it in my localhost DB. It then unmounts the folder.

    I want to create the same for my windows machine but can't find much documentation on how to do it.

    Anyone know the best way to do this on a Windows XP machine?


Comments

  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    Don't know how it's done, but WebDrive managed it, so it must be possible.


  • Moderators, Business & Finance Moderators Posts: 10,306 Mod ✭✭✭✭Jim2007


    Peter B wrote: »
    Anyone know the best way to do this on a Windows XP machine?

    I've done this several times in the past from code - call the Windows API to map the drive, copy the file and so on....

    However from what your asking I guess it might be easier to do using Powershell, the new MS scripting language for windows. I've never used it, but have a google for "Powershell" and "Map Drive", that should get you started.

    Jim.


  • Registered Users Posts: 2,426 ✭✭✭ressem


    Not so sure that it would be simple in Powershell.

    There is a user-mode file system driver called Dokan
    http://dokan.googlecode.com/svn/trunk/dokan_sshfs/readme.txt
    that could allow you to do this.

    Alternatively...
    I would look at installing Cygwin on your XP machine. This allows you to install many GNU and other unixish utilities, such as ssh.
    While you can't mount the file system using this, you can retrieve files using the command scp which is part of the ssh package.

    If your database is mysql there's a fair chance that the rest of the script would need few changes.


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    You need a POSIX compliant enviroment, otherwise you will do your head in. Microsoft has pretty poor command line interfaces to their os unless you want to learn PowerShell, so you will need to emulate a UNIX enviroment as closely as possible. Cygwin or colinux should do the trick. MIcrosoft even provide a posix enviroment for sale(Windows UNIX subsystem/SUA) If you want UNIX functionality in Windows, don't expect windows to give it to you.


Advertisement