| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- 리눅스
- 프로그램
- synology
- Okazaki Ritsuko
- 백업
- 옥션
- youtube
- 벤치마크
- USB메모리
- 윈도우즈
- VMware
- php
- KBS한국어능력시험
- xml
- vbscript
- Hirano Aya
- 平野綾
- 맞춤법
- 자바스크립트
- Microsoft
- 프린터
- gentoo
- MFC
- 오카자키 리츠코
- 마비노기
- KBS
- 파이어폭스
- 한국어
- Firefox
- 岡崎律子
Archives
- Today
- Total
ARCHIVE ...
FTP 파일 업로드 자동화 VBScript 본문
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim command(4)
' Chr(34) - 더블쿼테이션마크
command(0) = "open 117.16.14.27"
command(1) = "anonymous"
command(2) = "none@gmail.com"
command(3) = "put " & Chr(34) & "사유서 제출자명단.hwp" & Chr(34)
command(4) = "quit"
strTmpPath = objShell.ExpandEnvironmentStrings("%TEMP%")
strFile = strTmpPath & "\ftpput.txt"
strResultFile = strTmpPath & "\ftpResult.txt"
'If objFSO.FileExists(strFile) Then
' msgBox "File Exists"
'End If
Set objFile = objFSO.CreateTextFile(strFile, True)
For Each cmd In command
objFile.WriteLine(cmd)
Next
objShell.Run "%comspec% /c ftp -s:" & strFile & " > " & strResultFile, 0, True
If objFSO.FileExists(strResultFile) Then
Set objResultFile = objFSO.OpenTextFile(strResultFile, 1)
MsgBox objResultFile.ReadAll, vbInformation, "결과"
' objFSO.DeleteFile(strResultFile)
Else
MsgBox "The result file Does not exists."
End If
Set objShell = Nothing
objFile.Close
Comments