How to download into good drive without use data
Open Google colab
Create New Notebook 👇
Mount Google drive folder using this code👇
from google.colab import drive
drive.mount("/content/drive")
And follow setups
Wget using direct download into colab storage and device storage and
Which storage you mounted (google drive, onedrive, mega drive, mediafire, and more clouds storage...)
Code type in cell:
!wget <link>
#replace your link with <link> = !wget https://..
Wget multiple download
Okay, here's how you can download multiple files using wget in Colab:
Steps:
Past links using space
!wget <link> <link> <link> ...
Or
Create a text file containing the URLs:
Create a text file (e.g., download_list.txt) where each line contains the URL of a file you want to download. For instance:
https://example.com/file1.zip
https://example.com/file2.txt
https://example.com/file3.jpg
Use code with caution
Use wget with the -i option:
Execute the following command in a Colab cell:
!wget -i download_list.txt
Use code with caution
The -i option tells wget to read URLs from the specified file (download_list.txt).
Reasoning:
wget is a command-line utility for downloading files from the web.
The -i option allows you to specify a file containing a list of URLs, making it convenient for downloading multiple files.
By default, wget will save the downloaded files in the current working directory. You can use the -P option to specify a different output directory.
Example:
!echo "https://example.com/file1.zip" > download_list.txt
!echo "https://example.com/file2.txt" >> download_list.txt
!echo "https://example.com/file3.jpg" >> download_list.txt
!wget -i download_list.txt
Use code with caution
Additional Options:
-O filename: Specify the output filename for a single URL in the list.
-P directory: Specify the download directory.
-b: Run in the background.
-q: Quiet mode (suppress output).
-c or --continue: Resume a partially downloaded file.
I hope this helps! Let me know if you have any other questions.