Showing posts with label Command Prompt. Show all posts
Showing posts with label Command Prompt. Show all posts
Resuming Partial Downloads
Suppose you started to download a big file like an ISO image or a movie. What if after a considerable amount is downloaded your connection got lost or your browser got crashed, if you try to download the file again it will start from scratch. It is not a big problem with small files or if you downloaded only a small amount of the file in the first place but if you downloaded something like over 90% you certainly do not want to start from scratch all over again.
Luckily there is a solution for that problem:
1- Download wget from here. It's the default download manager in Linux, but you can also use it on Windows.
2- Create a backup of your partial download, if you want.
3- Place wget and your file in same folder. (you can also specify the download folder in command line if you want like: wget c:\folder\partialfile.iso)
4- Open command prompt and navigate to the your folder.
5- Type:
Internet Explorer will add an extra extension to your partial download. You need to delete that part from the file name.
-O: if you want to save a file with a different name, you can add -O
wget -O ubuntu.iso -c http://www.example.com/partialfile.iso
--limit-rate: for setting a speed limit to your download
wget --limit-rate=400k -c http://www.example.com/partialfile.iso
-i: download multiple files. You can add all your download urls as separate files in a text file and use this file in one go instead of initiating a new command for every file.
wget -i textfile.txt
-r-A: Download every specific files from a website. For example if you want to download all the pdfs:
wget -r -A.pdf http://www.example.com
ftp-url: If the file you want to download is on an ftp server (you may not need to specify this, but just in case if you are experiencing problems) you should type:
wget ftp-url ftp://example.com
Luckily there is a solution for that problem:
1- Download wget from here. It's the default download manager in Linux, but you can also use it on Windows.
2- Create a backup of your partial download, if you want.
3- Place wget and your file in same folder. (you can also specify the download folder in command line if you want like: wget c:\folder\partialfile.iso)
4- Open command prompt and navigate to the your folder.
5- Type:
wget –c http://www.example.com/partialfile.iso-c operation is for checking if there is a partial download in the folder and how much is downloaded. For fresh downloads you don't need to add it.
Internet Explorer will add an extra extension to your partial download. You need to delete that part from the file name.
partialfile.iso.snhkgvz.partialGoogle Chrome adds .crdownload to file name
partialfile.iso.crdownloadadvanced options:
-O: if you want to save a file with a different name, you can add -O
wget -O ubuntu.iso -c http://www.example.com/partialfile.iso
--limit-rate: for setting a speed limit to your download
wget --limit-rate=400k -c http://www.example.com/partialfile.iso
-i: download multiple files. You can add all your download urls as separate files in a text file and use this file in one go instead of initiating a new command for every file.
wget -i textfile.txt
-r-A: Download every specific files from a website. For example if you want to download all the pdfs:
wget -r -A.pdf http://www.example.com
ftp-url: If the file you want to download is on an ftp server (you may not need to specify this, but just in case if you are experiencing problems) you should type:
wget ftp-url ftp://example.com
How to quickly replace the file extensions of several files
Sometimes it may be necessary to change the extensions of several files to allow compatibility with a particular program. For example you may need to change the extension of all the asp files in a folder to htm. If there are plenty of files in your folder it would be a very tedious work to do. But with a little command magic you can do the job in just a few steps.
For this example we will change all the files with an *.asp extension to a *.htm files.
If you want to keep the original files just in case use the below command at the CMD prompt or within a batch file:
For this example we will change all the files with an *.asp extension to a *.htm files.
If you want to keep the original files just in case use the below command at the CMD prompt or within a batch file:
xcopy *.asp *.htm
This would create a copy of all files with .asp extension and rename them to .htm, while keeping the original files.
If you simply wish to rename the extensions without keeping the original file you can just replace xcopy command to rename as below example.
rename *.asp *.htm
What if your files do not have any extension at all (there are programs that come in archives with text files that do not have extensons). For example if you want to add txt extension to all files in a folder open command prompt (win + R / cmd), navigate to your folder than enter the below command.
ren * *.jpg
Subscribe to:
Posts
(
Atom
)