Hello, I am trying to download something via cmd or bat script.. The problem is i don't know how to download it since its version name keeps changing in the link... http://www.hibitsoft.ir/HiBitUninstaller/HiBitUninstaller-Portable-2.5.90.zip if link were static i could use this, but with dynamic link like that i need a wildcarded command? i need some kind of pattern maybe.. bitsadmin /transfer myDownloadJob /download /priority normal https://www.xxxxx.com/xxx %cd%\xxx > nul
Hi! To download this file, you can use this Batch script: Code: @ECHO OFF ECHO Downloading webpage of HiBit Uninstaller... PowerShell.exe -NoProfile -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.hibitsoft.ir/Uninstaller.html', \"%TEMP%\HiBit Uninstaller.txt\")" ECHO Parsing downloaded HTML file... FOR /F "tokens=4" %%L IN ('FINDSTR /I /C:"Latest version:" "%TEMP%\HiBit Uninstaller.txt"') DO SET "version=%%L" TIMEOUT /T 1 /NOBREAK > NUL ECHO Current version of HiBit Uninstaller: %version% TIMEOUT /T 1 /NOBREAK > NUL ECHO Downloading HiBit Uninstaller %version%... Please wait. PowerShell.exe -NoProfile -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.hibitsoft.ir/HiBitUninstaller/HiBitUninstaller-Portable-%version%.zip', \"%~dp0\HiBitUninstaller-Portable-2.5.95.zip\")" ECHO The installation program of HiBit Uninstaller has been successfully downloaded to the current directory. ECHO Press any key to exit this script... pause > NUL EXIT The used method is downloading the main webpage of the software with PowerShell and parsing it to get the version number. Then, all that is left to do is downloading the file by adding the version number to the download link. Happy computing! Best regards
hmm if you are using Firefox just click here http://www.hibitsoft.ir/HiBitUninstaller/HiBitUninstaller-Portable-2.5.90.zip and the file will be saved in your downloads folder so open with 7zip
changing the version number simply is the only thing i am trying to avoid. i am trying to make this automated. really man? thx guys i made it happen via aria2.exe tool