by newsak2005 28/05/11, 02:56 pm
- Code:
#include <Process.au3>
Global $sCommand = 'REN Monalisa.exe Monalisa.txt' ;Add command and file to change name type.
Local $btn = MsgBox(36, "", "Do you wanted file rename type?")
If $btn = 7 Then Exit
_RunDOS ($sCommand)
If Not @error Then
MsgBox(64, "", "File rename type successful.")
Else
MsgBox(48, "Error!", "Cannot change file name type.")
EndIf
OR - Code:
#include <Process.au3>
Global $oFile = 'Monalisa.exe', $nFile = 'Monalisa.txt' ;New file to change name type.
Global $sCommand = 'REN Monalisa.exe Monalisa.txt'
If Not FileExists($oFile)Then
MsgBox(0, "", "Cannot found file " & $oFile)
Exit
EndIf
Local $btn = MsgBox(36, "", "Do you wanted rename type " & $oFile &"?")
If $btn = 7 Then Exit
Dim $i
ProgressOn("", "", "", 362, 230)
For $i = 0 To 100 Step 5
_RunDOS ($sCommand)
If Not @error Then
ProgressSet($i, "", "Convertting.." & $i & "%")
Sleep(1)
EndIf
Next
ProgressSet(100, "", "Convertting..100%")
If FileExists($nFile)Then
MsgBox(64, "", "File rename type successful.")
ProgressOff()
Else
MsgBox(48, "Error!", "Cannot change file name type.")
EndIf
---------------------------------------------------------------------
เดี๋ยวสร้างโปรแกรมสำหรับเปลี่ยน ชื่อ - สกุล ไฟล์ต่างๆ มาให้ใช้