请教大神vb如何下载图片到指定的文件夹,并重新命名
DT=Format(Date,"yyyymmdd")MkDir(DT)U1="http://aaa.com/data/48.gif":F=App.Path&"\"&DT&...
DT = Format(Date, "yyyymmdd")
MkDir (DT)
U1 = "http://aaa.com/data/48.gif": F = App.Path & "\" & DT & "48.gif"
S1 = URLDownloadToFile(0, U1, F, 0, 0)
写了如上代码
文件夹建立成功,图片下载成功,可以存为日期图片了,
但是放不到日期文件夹DT里啊 。
我想放入比如 D:\20151127 文件夹里
如何修改上面代码请教大神
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Sub Command1_Click()
Dim U1 As String, S1 As Long, DDD As Long
DT = Format(Date, "yyyymmdd")
MkDir (DT)
U1 = "https://www.baidu.com/img/baidu_jgylogo3.gif": F = App.Path & "\" & DT & "48.gif"
S1 = URLDownloadToFile(0, U1, F, 0, 0)
MsgBox "下载完毕" End Sub 完整代码 ,如何能放入新生成的文件夹里? 展开
MkDir (DT)
U1 = "http://aaa.com/data/48.gif": F = App.Path & "\" & DT & "48.gif"
S1 = URLDownloadToFile(0, U1, F, 0, 0)
写了如上代码
文件夹建立成功,图片下载成功,可以存为日期图片了,
但是放不到日期文件夹DT里啊 。
我想放入比如 D:\20151127 文件夹里
如何修改上面代码请教大神
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Sub Command1_Click()
Dim U1 As String, S1 As Long, DDD As Long
DT = Format(Date, "yyyymmdd")
MkDir (DT)
U1 = "https://www.baidu.com/img/baidu_jgylogo3.gif": F = App.Path & "\" & DT & "48.gif"
S1 = URLDownloadToFile(0, U1, F, 0, 0)
MsgBox "下载完毕" End Sub 完整代码 ,如何能放入新生成的文件夹里? 展开
若以下回答无法解决问题,邀请你更新回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询