Jump to content

How to download file from Internet in specific location


Recommended Posts

For example, I want to download a image form internet in Music folder but it download image where autoit (.exe  is placed.

If my autoit (.exe) is placed on desktop, it will download image on desktop too

my code: 

Quote

Local $hDownload = InetGet("https://media.com/abc.jpg","abc.jpg", 1 , 1)
    Sleep(250)
        Do
        Sleep(250)
        Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)
    Sleep(1000)

i want to download image on my desired location

please help....

Link to comment
Share on other sites

  • Developers

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

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

For example, I want to download an image from the internet in the Music folder but it downloads an image where AutoIt (.exe) is placed.

If my AutoIt (.exe) is placed on a desktop, it will download the image on the desktop too

my code: 

     Quote
    Local $hDownload = InetGet("https://media.com/abc.jpg","abc.jpg", 1 , 1)
        Sleep(250)
            Do
            Sleep(250)
            Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)
        Sleep(1000)

I want to download image on my desired location

please help...

Link to comment
Share on other sites

  • Developers
10 minutes ago, SyedHamza said:

I want to download image on my desired location

So what about you add the path to the filename to include the location?

.. and why did you start a new topic?  ...Just stick with this one please!

Jos

Edited by Jos

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

  • Developers
24 minutes ago, SyedHamza said:

Local $hDownload = InetGet("https://media.com/abc.jpg","c:/what/ever/directory/abc.jpg", 1 , 1)

Come on ....  try something and don't claim noobness as a reason not to try and learn! 

 

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

Sorry bro. It is working now

i forgot to add complete path, i wrote

Local $hDownload = InetGet("https://media.com/abc.jpg","@StartupDir", 1 , 1)

it was my fault

now i give complete path like this

Local $hDownload = InetGet("https://media.com/abc.jpg","@StartupDir & "\abc.png"", 1 , 1)

and this working perfect

thanks you so much for your time

Link to comment
Share on other sites

 

sir, but I have another issue. not related to script or syntax
it a problem with windows defender
I write a very very basic program. this

#RequireAdmin
ProgressOn("Waiting", "Setup", "Loading")
 For $i = 0 To 50
     ProgressSet($i)
     Sleep(50)
 Next

but I don't know why is my Windows Defender detecting a virus in it?
it is just a loading bar and nothing more...

Link to comment
Share on other sites

  • Developers
28 minutes ago, SyedHamza said:

but I don't know why is my Windows Defender detecting a virus in 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

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...