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
<?xml version="1.0" standalone="yes"?> | |
<package> | |
<job id="RotateBackup"> | |
<?job error="false" debug="true"?> | |
<runtime> | |
<description> | |
バックアップをローテーションする。 | |
</description> | |
<named | |
name="srcfile" |
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 | |
Sub Main() | |
Dim srcfile, dstdir | |
If Not WScript.Arguments.Named.Exists("srcfile") Then | |
WScript.Echo("srcfile is required.") | |
WScript.Quit(1) | |
Exit Sub | |
End If | |
srcfile = WScript.Arguments.Named.Item("srcfile") |
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 | |
Private Function ValidateArguments() | |
If Not WScript.Arguments.Named.Exists("srcfile") Then | |
WScript.Echo("srcfile is required.") | |
ValidateArguments = False | |
Exit Function | |
End If | |
If Not WScript.Arguments.Named.Exists("dstdir") Then | |
WScript.Echo("dstdir is required.") |
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
Public Sub Import(ByVal strFileName) | |
Const ForReading = 1 | |
Dim objFso, objFile | |
Set objFso = WScript.CreateObject("Scripting.FileSystemObject") | |
Set objFile = objFso.OpenTextFile(strFileName, ForReading, False) | |
ExecuteGlobal objFile.ReadAll() | |
objFile.Close() | |
End Sub | |
Call Import("string.vbs") |
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 | |
Public Sub Import(ByVal strFileName) | |
Const ForReading = 1 | |
Dim objFso, objFile | |
Set objFso = WScript.CreateObject("Scripting.FileSystemObject") | |
Set objFile = objFso.OpenTextFile(strFileName, ForReading, False) | |
ExecuteGlobal objFile.ReadAll() | |
objFile.Close() | |
End Sub |
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
<?xml version="1.0" standalone="yes"?> | |
<package> | |
<job id="RotateBackup"> | |
<?job error="false" debug="true"?> | |
<runtime> | |
<description> | |
バックアップをローテーションする。 | |
</description> | |
<named | |
name="srcfile" |
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 | |
Private Sub Copy(ByVal strSrc, ByVal strDst) | |
Dim objFso | |
Set objFso = WScript.CreateObject("Scripting.FileSystemObject") | |
If objFso.FileExists(strSrc) Then | |
Call objFso.CopyFile(strSrc, strDst) | |
Else | |
' do nothing | |
End If |
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 | |
Private Function Main() | |
If Not ValidateArguments() Then | |
Main = 1 | |
Exit Function | |
End If | |
Dim strSrcFile, strDstDir | |
strSrcFile = WScript.Arguments.Named.Item("srcfile") | |
strDstDir = WScript.Arguments.Named.Item("dstdir") |
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 | |
Public Function PathCombine(ByVal strPath1, ByVal strPath2) | |
Dim objFso | |
Set objFso = WScript.CreateObject("Scripting.FileSystemObject") | |
PathCombine = objFso.BuildPath(strPath1, strPath2) | |
End Function | |
Public Sub Copy(ByVal strSrcPath, ByVal strDstPath) | |
Dim objFso |
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 | |
Const INTERVAL_SEC = 10 | |
Const WINSHOT_PATH = "C:\Users\user\Documents\ws153a\winshot.exe" | |
Const WINSHOT_OPTS = "-J -D -X" | |
Const FFMPEG_PATH = "C:\Users\user\Documents\ffmpeg\bin\ffmpeg.exe" | |
Const CAPTURE_DIR = "C:\Users\user\Pictures\winshot\" | |
Dim objShell, objFso | |
Set objShell = WScript.CreateObject("WScript.Shell") |