作者:lotus516 | 时间:2007-12-08 20:12 | 标题:curl的问题,如何实现下载到指定文件夹?
如题!!
作者:lxmxn | 时间:2007-12-08 20:22
curl -o yourdir URL
作者:lotus516 | 时间:2007-12-08 20:27
没用啊!!我就是这样的,出错!
作者:lxmxn | 时间:2007-12-08 22:14
不是,-o 参数后面是路径名加上保存的文件名。
作者:ngd | 时间:2008-01-08 13:39
D:\downloads>
curl -o \kagaa\星空.jpg http://photo5.hexun.com/p/2007/0427/92602/b_7B89B404F90F106E56FBE0BB5908C518.jpg
Warning: Failed to create the file \kagaa\星空.jpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
2 175k 2 3631 0 0 6639 0 0:00:27 --:--:-- 0:00:27 6639
curl: (23) Failed writing body
如何创建目录?
[
Last edited by ngd on 2008-1-8 at 01:40 PM ]
作者:ngd | 时间:2008-01-08 13:52
md kagaa & curl http://photo5.hexun.com/p/2007/0427/92602/b_7B89B404F90F106E56FBE0BB5908C518.jpg>kagaa\星空.jpg
[
Last edited by ngd on 2008-1-8 at 02:20 PM ]
作者:AlexZhang | 时间:2008-01-08 22:28
I'm not quite familiar to this command-line tool
and I recommend u 2 use "wget"
作者:ngd | 时间:2008-01-09 10:13
作者:Wengier | 时间:2008-01-12 10:13
应加上--create-dirs参数。例如:
curl --create-dirs -o \kagaa\星空.jpg http://photo5.hexun.com/p/2007/0427/92602/b_7B89B404F90F106E56FBE0BB5908C518.jpg
作者:ngd | 时间:2008-01-12 10:46
o(∩_∩)o... 多谢 还有这参数
试了一下:
D:\downloads>curl --create-dirs -o \kagaa\星空.jpg
http://photo5.hexun.com/p/200
7/0427/92602/b_7B89B404F90F106E56FBE0BB5908C518.jpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 175k 100 175k 0 0 33395 0 0:00:05 0:00:05 --:--:-- 39765
不过不是在当前目录下建立 kagaa 文件夹
跑根目录建了一个 kagaa
呵呵
作者:Wengier | 时间:2008-01-12 10:50
Originally posted by ngd at 2008-1-12 10:46 AM:
o(∩_∩)o... 多谢 还有这参数
试了一下:
D:\downloads>curl --create-dirs -o \kagaa\星空.jpg http://photo5.hexun.com/p/200
7/0427/92602/b_7B89B404F90F106E56FBE0BB590 ...
因为"\kagaa\星空.jpg"就是指根目录下的kagaa目录呀。如果是指当前目录下的kagaa目录的话,直接改为"kagaa\星空.jpg"就可以了。
作者:ngd | 时间:2008-01-12 13:17
作者:fennng | 时间:2008-01-12 13:55
不错哦,从来没想过用它建文件夹...在前面加一句MD在CD一下应该也行...不过我都是下载当然文件夹...
作者:Wengier | 时间:2008-01-12 14:32