{urgent} i need help with a system!

Im making a bat program that opens my website (Which upon opening downloads a file from another site, and then mirrors it to the user {For safety and logging reasons}
I have the bat program ready (Halfway)
because the name changes on the file every download i need to make the site download the file, check the name, and then send the name of the file to the bat program and the bat program opens it. is this possible? thanks

EDIT:::
I found out how to download check name. now all i need to do is send the name to the bat file. PLEASE HELP!
(Bonus) can i make a bat file close the site after completion of the file download?

Please help, PLLEASE.

Sounds like a batch file. But who knows? These kids. There’s no bat files on the web. Seriously, OP, WTF are you on about?

1 Like

Yeah I agree, the post is confusing as to the end goal and sounds a little shady if I’m honest.

As for the bonus, you could probably run some JavaScript once the download starts e.g. window.close(): though this has limitations in browsers with the confirmation dialog, results will vary, unless the link is originally opened in JavaScript.

If the bat(ch) file is running locally on your computer I doubt this is possible.

You are hoping to pass information from a web server to localhost. You would need to run some sort of server capability on your PC so that the website knows where to send the info.

I will recommend any automation tools like win-automation. It does exactly what you need for.

For all those people complaining, let me put it into terms that anyone can understand…

Im making a batch file (.bat is the extension) that opens my website, Downloads a file on my website runs the file on the host computer, and then closes. The name of the downloaded file is stored in the database on the website.

I now need to find out a way to send the name of the downloaded file (Whats stored in the database) to the batch file (bat) so the bat can open it on the host computer.

But because the downloaded file’s name value changes each download, I need to figure out how to actually send the name to the host computer. I use an API call to change the name each download. Is there a way i can send the api call to the batch file?

Bonus::: Can i close the site and just the site after downloading this file and sending info to the batch file. or is that possible.

Oh so the batch file is run on the end-user machine. Have you tried with powershell?

No, and i really dont know how to approach with that

You can do it with powershell for sure.

https://www.google.es/search?safe=off&source=hp&ei=6PJyXLLrAoqysAfcgbu4CQ&q=learn+powershell

Good luck.

I’ve found Batch is very limited in functionality, I think API calls is limiting as well as it can’t process JSON. I think PowerShell is best for you to learn. I’ve not learnt it but you can watch tutorials online and I know it definitely does API GET & POST Calls

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.