Dim objShell, objFolder, WorkPath, objFolderItem, oFso
Dim sFileDir, sRecFileNm
Set objShell = CreateObject("Shell.Application")
Set oFso = CreateObject("Scripting.FileSystemObject")
Set objFolder = objShell.BrowseForFolder(0, "다운로드 폴더 선택", 0, "C:\ D:\;")
On Error Resume Next
Set objFolderItem = objFolder.Self
WorkPath = objFolderItem.Path
SpSrc.innerHTML = WorkPath & "\"
sFileDir = "/" 'FTP 파일경로
sRecFileNm = "card_"&sDate&".txt" '파일명
If WorkPath = "" Then
WorkPath = "C:\Users\Administrator\Downloads"
End If
If DownloadFtp(sFtpIp, sFileDir, sRecFileNm, WorkPath, "ftponly", "cjd9ok") Then
Call fnShowXMLMessageBox("MPAM00004", sRecFileNm & " 파일이 Download ", MSG_TYPE_NONE)
'다운로드 폴더를 열어준다
If oFso.FolderExists(WorkPath) Then
objShell.Open WorkPath
End If
Else
MsgBox("FILE Download중 에러가 발생하였습니다.")
End If
Set objShell = Nothing
Set objFolder = Nothing
Set objFolderItem = Nothing
Set oFso = Nothing
'★Dev★ > VB Script' 카테고리의 다른 글
[VB Script] Windows Os bit 확인 (0) | 2019.11.14 |
---|---|
[VB Script] 형변환 (0) | 2018.12.13 |