Need help with AMS/WGet intergration problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mystica
    No longer a forum member
    • May 2007
    • 1548

    Need help with AMS/WGet intergration problem

    Hi all,

    Was hoping someone might be able to help me with the following problem. (I guess this is really more of a WGet problem than an AMS problem, but was hoping someone might know the answer anyway):

    Basically what I'm doing is using AMS to create a simple GUI for the command-line utility called "WGet" (which allows the user to download files via the command prompt).

    What I've done, is place a copy of WGet in the AMS "Documents" folder, which is then launched via a preconfigured batch-file after clicking the appropriate button on my AMS page.

    So far, everything works fine ... WGet retrieves the needed file and downloads it via the command-prompt. It does this by using the standard DOS command for downloading files with WGet. This command is:

    wget -v --load- http://www.example.com

    However, my problem is that by using this command, the file will always be downloaded to the same folder/directory from which WGet is launched (in this case, that folder is the AMS 'Documents' folder.

    What I want instead, is for the file to be downloaded to the Windows "MyDocuments" folder instead. To complicate matters further, I also want the file to be downloaded to the Windows "MyDocuments" folder, REGARDLESS of the Drive-Letter on which the user has Windows installed (ie. the user's MyDocuments folder might be on Drive-D as opposed to standard Drive-C).

    So, basically what I need to know is how to change the DOS-command so that "WGet" downloads files to the appropriate directory. Like I said, I realize this is more of a WGet/DOS issue than an AMS issue, but I'm hoping someone might be able to help anyway.

    PS.
    If needs be, I can use "Curl" (an aternative command-line downloader) instead of "WGet". But at the moment, I'm facing the same problem when I use "Curl". The command I use for it is:

    curl -L -O --http://www.example.com

    which also causes the file to be downloaded to AMS "Documents" folder instead of the desired Windows "MyDocuments" folder.
  • Ulrich
    Indigo Rose Staff Member
    • Apr 2005
    • 5131

    #2
    Why don't you use HTTP.Download()?

    Ulrich

    Comment

    • RizlaUK
      Indigo Rose Customer
      • May 2006
      • 5552

      #3
      the only advantage of useing WGet in AMS is being able to download in the background and have the ams app do other stuff

      other than that i would use AMS to do all the download work

      you can use "Shell.GetFolder" to get the path to the users My Docs folder

      if you must use WGet or Curl, try setting the working folder "in the File.Run function" to the folder you want the file to be downloaded to :yes
      Embrace change in your life, you never know, it could all work out for the best

      Comment

      • mystica
        No longer a forum member
        • May 2007
        • 1548

        #4
        upeters & RizlaUK,

        Yep, thanks guys. I had a closer look at the AMS documentation/examples in relation to your suggestions. I think you are both right ... better to use HTTP.Download and get AMS to do all the work. Thankyou both for your input!

        Comment

        Working...
        X