Windows 10: System.Net.WebClient in .bat problem with download zip file Powershell

Discus and support System.Net.WebClient in .bat problem with download zip file Powershell in Windows 10 Support to solve the problem; Hello, I'm preparing a .bat file that downloads few files. I encountered a problem with downloading a larger file. Perhaps it is not the size of the... Discussion in 'Windows 10 Support' started by dzaggiel, Feb 6, 2019.

  1. dzaggiel Win User

    System.Net.WebClient in .bat problem with download zip file Powershell


    Hello, I'm preparing a .bat file that downloads few files. I encountered a problem with downloading a larger file. Perhaps it is not the size of the file but a specific link. Well, in the bat file I use the command:

    Code: powershell.exe -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.gigabyte.eu/FileList/Driver/mb_driver_audio_realtek_9series.zip','c:\AutoInstalator_temp\mb_driver_audio_realtek_9series')"[/quote] The file has been successfully downloaded but unfortunately has the extension (zip) (.zip) and instead of the content there is a file with the same name but no extension. After unpacking the second file, the content is finally there. But why?

    With smaller files of this type, I did not have any problems and I used the same formula.
    I also tried Start-BitsTransfer and it's the same problem. The only command that works correctly is Invoke-WebRequest but it is very slow.
    Do you know how to solve my problem?

    :)
     
    dzaggiel, Feb 6, 2019
    #1
  2. Lucasonas Win User

    BAT file/Script to find and replace files

    Hi, innovative thinkers! I am looking for a BAT file or script that takes random named zips, consisting of 5 random numerals in the name, and renames the zips identical to different .txt files with that same 5 numeral in the same folder.

    Here is an example of what I mean:

    BEFORE BAT

    C:\Documents

    45678_Example_720p.zip
    34284_Example_720p.zip
    67483_Example_720p.zip

    RAT_Example_45678_24f_ONO.txt
    RAT_Example_34284_24f_ONO.txt
    RAT_Example_67483_24f_ONO.txt

    AFTER BAT

    C:\Documents

    RAT_Example_45678_24f_ONO.zip
    RAT_Example_34284_24f_ONO.zip
    RAT_Example_67483_24f_ONO.zip

    RAT_Example_45678_24f_ONO.txt
    RAT_Example_34284_24f_ONO.txt
    RAT_Example_67483_24f_ONO.txt

    I would like the BAT to take only those matching 5 numerals as a reference.

    Thanks

    *Oh Well System.Net.WebClient in .bat problem with download zip file Powershell :eek:hwell:
     
    Lucasonas, Feb 6, 2019
    #2
  3. Lucasonas Win User
    BAT file/Script to find and replace files

    Greetings, streetfighter 2.

    I'll give your BAT a try. Thanks so much.

    Greetings, FordGT90Concept!

    Question:

    "So you have a directory containing both random named ZIP files and consistently named TXT files and you want to apply the TXT file naming patern to the ZIP files where the 5-digit numbers match?"

    Answer: Yes

    Question:

    Are there sub-directories?

    Answer: No

    Question:

    "Are all the ZIP file names in that pattern (#####_Example_720p.zip) and all the TXT files in that pattern (RAT_Example_#####_24f_ONO.txt)?"

    Answer: Yes

    Sorry about the terse replies, but your right: "Never assume."

    Greetings, Streetfighter 2

    I'll give your BAT a try. Thanks alot!
     
    Lucasonas, Feb 6, 2019
    #3
  4. Berton Win User

    System.Net.WebClient in .bat problem with download zip file Powershell

    Can't open Zip Files


    The icon for the .zip file suggests it doesn't have a program associated with it. Windows does have built-in support for .zip files but something must have happened to that feature. I usually recommend the free 7-Zip for working with compressed files, helps in diagnosing where a problem may lie. I found the file on the 'net, downloaded it and opened fine.
    http://www.7-zip.org/
     
    Berton, Feb 6, 2019
    #4
Thema:

System.Net.WebClient in .bat problem with download zip file Powershell

Loading...
  1. System.Net.WebClient in .bat problem with download zip file Powershell - Similar Threads - System Net WebClient

  2. Unable to open downloaded Zip Files

    in Windows 10 Network and Sharing
    Unable to open downloaded Zip Files: Hi all, I recently installed windows 10 on the computer. However, when I download a folder from One Drive web onto my desktop - I am unable to open the file. The error shown is that it is unable to track the location of the Zip folder as per the current location. Please...
  3. How to download zip file to my computer?

    in Windows 10 Customization
    How to download zip file to my computer?: I always get a VSL format every time I tried downloading a zip file from my computer? I am so frustrated. How can I change this so that I can download the zip file to my computer and re upload them to my shopify store? Thanks...
  4. Cannot download zip files

    in Windows 10 Software and Apps
    Cannot download zip files: Cannot download .zip files, click on them brings up a blank page. 50775
  5. I Can't Download Zip files

    in Windows 10 Support
    I Can't Download Zip files: I also cannot edit any of my files. I get messages saying I have to have Admin permissions. I am the Admin. I want to get a web page up and running but if I can't edit files and download zips I'm screwed. Anybody know how fix this? I hate to think I paid $800 for a...
  6. Task Scheduler and Bat File Problem

    in Windows 10 Support
    Task Scheduler and Bat File Problem: Hi, Not sure which forum to post this in, but hopefully someone has some insight and can help me with this. I have a simple .bat file that stops my media server, creates an archive of a folder (for backup purposes), and then starts the media server again. It works...
  7. Zip file downloads.

    in Windows 10 Performance & Maintenance
    Zip file downloads.: I have been struggling with tweaking my newly restored Win 10. Nearly every set of instructions that I follow is wrong. I am continuously downloading the same program repeatedly. I am doing tasks two or three times before it fully responds. It can't be just me. To...
  8. Learning Powershell, for an old DOS BAT-file guy

    in Windows 10 Support
    Learning Powershell, for an old DOS BAT-file guy: So I go back to the days of DOS 6.2, and I've done a lot of BAT files since .*Nerd But I keep reading about Powershell. I've looked at some MS webpages for learning Powershell, and the learning curve seems pretty steep.*Sick Can anyone suggest a way to get started easily,...
  9. problem saving .bat file

    in Windows 10 Support
    problem saving .bat file: In Win 10, want to save .bat file in a Program directory. Downloaded a program in a zip file and unzipped it to a Program Files (x86) folder. This folder has other .bat files but one was missing. Now have it but cannot save it in the folder. I am the owner of the folder. 69008
  10. File association problem with .reg and .bat files

    in Windows 10 Support
    File association problem with .reg and .bat files: Asus laptop with WINDOWS 10 When double clicking a .reg file the default action is merge by running the regedit.exe. On the right-click content menu I have Merge (in bold), edit and print, select edit opens the notepad for editing. In order to prevent from merging the .reg...