wget的安装和使用方法

最近稍稍研究了下wget,有什么优点暂时还没摸透 ̄□ ̄||

我的下载里我上传了wget的压缩包,可以去下载https://download.csdn.net/download/qq_37059136/10593766

(我下载的别人的是3积分,我只收2积分,大大的好人呐)

下面说一下wget的使用前置,如果你只是解压下来打开,会发现他会一闪而退,并不是我骗你,给你个垃圾应用,而是你没有掌握到他的使用方法

第一步

第二步

第三步

第四步

图中圈出来的地方是你解压放置wget的绝对路径

到这里wget的前置使用条件完成

下面展示下wget的使用方法(下载指定网页)

首先是代码

#include<stdio.h>
#include<windows.h>
#include<tchar.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>

using namespace std;
int main()
{
	string rarPath = "C:\\Users\\Administrator\\Desktop\\新建文件夹";//你要下载的文件路径

	SetCurrentDirectoryA(rarPath.c_str());//将进程的工作目录移动到该参数所指的目录下

	char* lcm="wget -p  https://blog.csdn.net/qq_37059136/article/details/81483976 --no-check-certificate";

	printf("shell command line :%s\n",lcm);

	system(lcm);

	puts("下载完毕.");

	return 0;
}

看一下运行结果

这里只有一些简单用法,之后会更新一些常用用法

猜你喜欢

转载自blog.csdn.net/qq_37059136/article/details/81540815