-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram.vbs
More file actions
60 lines (43 loc) · 1.45 KB
/
program.vbs
File metadata and controls
60 lines (43 loc) · 1.45 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Set FSO = CreateObject("Scripting.FileSystemObject")
Set XHR = CreateObject("MSXML2.XMLHTTP")
Set WSH = WScript.CreateObject("WScript.Shell")
Select Case WScript.ScriptName
Case "フォルダの一括作成・削除.vbs" : Call CreateAndDeleteFolders
Case "依頼フォルダリンクを更新.vbs" : Call UpdateLinkToIraiFolders
Case "依頼フォルダリンクを作成.vbs" : Call UpdateLinkToIraiFolders
Case "依頼フォルダリンクを一括作成.vbs" : Call UpdateLinkToIraiFolders_All
Case "リンク一覧表示.vbs" : Call OpenLinkList
Case Else :
End Select
Sub CreateAndDeleteFolders()
Set fRoot = FSO.GetFile(WScript.ScriptFullName).ParentFolder.ParentFolder
date0 = DateAdd("m", 1, Date)
date1 = DateAdd("m", -2, Date)
msgbox Right(Year(date0),2)
msgbox Month(date1)
for each file in fRoot.files
msgbox file.name
exit for
next
MsgBox fRoot.Path
End Sub
Sub UpdateLinkToIraiFolders()
url = "http://www.japannetbank.co.jp/service/payment/web_all/sample_zengin.csv"
XHR.Open "GET", url, False
XHR.Send
If XHR.Status < 400 Then
csv = XHR.responseText
arr = Split(csv,",")
End If
MsgBox csv
For Each a In arr
MsgBox a
exit for
Next
End Sub
Sub UpdateLinkToIraiFolders_All()
End Sub
Sub OpenLinkList()
no = FSO.GetFile(WScript.ScriptFullName).ParentFolder.Name
WSH.Run "https://www.google.co.jp/search?source=hp&q=" & no
End Sub