0

Normally when downloading files using wget, the filenames are encoded.

In example:

wget -c --content-disposition "https://class.coursera.org/ml-005/lecture/download.mp4?lecture_id=1"

and the saved filename is:

13%20-%201%20-%20Unsupervised%20Learning%3A%20Introduction%20%283%20min%29.mp413%20-%201%20-%20Unsupervised%20Learning%3A%20Introduction%20%283%20min%29.mp4

Is there any way to decode the files when downloading in batch?

Related:

2 Answers 2

1

The deurlname utility can handle urlencoded filenames.

2
  • if bypassing wget is an option the number of possible answers will increase exponentially :P ..
    – drAlberT
    Jul 15, 2014 at 12:20
  • deurlname *.* works perfect for the current folder.
    – kenorb
    Aug 8, 2014 at 16:00
1

You can pipe the file name through

sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.