This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'variable declaration | |
Dim crDir, f, line, ary, fName | |
Dim fso, wsh | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
Set wsh = CreateObject("WScript.Shell") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
メモ帳,%windir%\System32\notepad.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'test | |
'Read a text file | |
'iomode | |
Const ForReading = 1, ForWriting = 2, ForAppending = 8 | |
txtFile = "txtfile.txt" | |
Set fso = WScript.CreateObject("Scripting.FileSystemObject") | |
Set f = fso.OpenTextFile(txtFile, ForReading) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Write to a text file | |
'iomode | |
Const ForReading = 1, ForWriting = 2, ForAppending = 8 | |
txtFile = "txtfile.txt" | |
Set fso = WScript.CreateObject("Scripting.FileSystemObject") | |
Set f = fso.OpenTextFile(txtFile, ForAppending, True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' --------------------------------------------------- | |
' description: | |
' auther: name | |
' version: 1.0 | |
' since: yyyy/mm/dd | |
' update: yyyy/mm/dd | |
' --------------------------------------------------- | |
Option Explicit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;------------------------------------------------------ | |
; @description : telnet for CentOS | |
; @auther : n | |
; @version : 1.0 | |
; @since : 2019/4/9 | |
; @update : 2019/4/9 | |
;------------------------------------------------------ | |
target='192.168.0.1' | |
username='user' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;autocmd.ttl | |
macroname = 'autocmd' | |
cmdlist = 'cmdlist.txt' | |
prompt1 = '$' | |
prompt2 = '#' | |
timeout = 15 | |
;コマンドリストチェック | |
filesearch cmdlist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;------------------------------------------------------ | |
; @description : ssh for CentOS | |
; @auther : n | |
; @version : 1.1 | |
; @since : 2019/4/9 | |
; @update : 2019/11/12 | |
;------------------------------------------------------ | |
target='192.168.0.1' | |
username='user' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
' variable declaration | |
Dim svcs | |
Dim procList | |
Dim proc | |
Dim msg | |
' Process List Get | |
Set svcs = WScript.CreateObject("WbemScripting.SWbemLocator").ConnectServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim fso | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
'1.Get ScriptFile folder | |
MsgBox fso.getParentFolderName(WScript.ScriptFullName) | |
'2.C:\Windows\System32 | |
MsgBox fso.getParentFolderName("C:\Windows\System32\notepad.exe") | |
'3.notepad.exe |
OlderNewer