hi everyone, how to solve this problem: 'wget' is not recognized as an internal or external command?

6 views (last 30 days)
ERROR:- 'wget' is not recognized as an internal or external command,
operable program or batch file.
output_directory = 'sbu_images';
urls = textread('SBU_captioned_photo_dataset_urls.txt', '%s', -1);
if ~exist(output_directory, 'dir')
mkdir(output_directory);
end
rand('twister', 123);
urls = urls(randperm(length(urls)));
for i = 1 : length(urls)
if ~exist(fullfile(output_directory, [regexprep(urls{i}(24: end), '/','_')]))
cmd = ['wget -t 3 -T 5 --quiet ' urls{i} ...
' -O ' output_directory '/' regexprep(urls{i}(24: end), '/', '_')];
unix(cmd);
fprintf('%d. %s\n', i, urls{i});
end
end

Answers (1)

Jan
Jan on 6 Dec 2017
The error message is clear: Your unix system does not know a wget function. Note that this is not a Matlab problem. Most likely it is solved either by installing the package, which contains wget or by including the folder containing the executable to the PATH (of the OS, not of Matlab).
  3 Comments

Sign in to comment.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!