Name / Kill
Option Explicit
Private Const cnsSOUR = "C:\AAA\SAMPLE1.txt" ' 元ファイル
Private Const cnsDEST = "C:\BBB\SAMPLE2.txt" ' 先ファイル
' ファイル移動のサンプル①
Sub MOVE_SAMPLE1()
' ファイルを移動(この方法は同一ドライブのみ)
Name cnsSOUR As cnsDEST
End SubOption Explicit
Private Const cnsSOUR = "C:\AAA\SAMPLE1.txt" ' 元ファイル
Private Const cnsDEST = "C:\BBB\SAMPLE2.txt" ' 先ファイル
' ファイル削除のサンプル
Sub DELETE_SAMPLE()
' 元ファイルを削除
Kill cnsSOUR
End Subネタ元