Rename File Atau Folder


Private Declare Function SHFileOperation Lib “shell32.dll” Alias “SHFileOperationA” (lpFileOp As SHFILEOPSTRUCT) As Long
Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAborted As Boolean
hNameMaps As Long
sProgress As String
End Type
Const FO_DELETE = &H3
Const FO_RENAME = &H4
Const FO_COPY = &H2

Sub RenameFile()
Dim NewFileName As String
Dim TitleFile
Dim PathFile
‘On Error Resume Next
TitleFile = “Baru”
PathFile = “D:\Lama”
NewFileName = InputBox(“Are you sure want rename File ” & “””” & TitleFile & “””?”, _
“Rename File”, PathFile)
Dim SHDirOp As SHFILEOPSTRUCT
With SHDirOp
.wFunc = FO_RENAME
.pFrom = “D:\BARU”
.pTo = NewFileName
End With
SHFileOperation SHDirOp
End Sub

Private Sub Form_Load()
RenameFile
End Sub

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

Zoemalang's community

ujung malang adalah Sebuah desa yang hilang terganti dengan ujung harapan

YoYo Games Blog Feed

Ujung malang adalah Sebuah desa yang hilang terganti dengan ujung harapan

Dealer Termurah

Menjual Segala Jenis Motor Baru Di Indonesia Cash Maupun Kredit

%d blogger menyukai ini: