Tol!k

|
Posted: Fri Mar 18, 2011 19:03 Post subject: |
|
|
А если скриптом?
Code: | ' параметры: %N
Set Args = WScript.Arguments
If Args.Count < 1 Then
MsgBox "Нужен файл...", vbInformation, "Переименование файла"
WScript.Quit
End If
Set FSO = CreateObject("Scripting.FileSystemObject")
fName = FSO.GetBaseName(Args(0))
fExt = FSO.GetExtensionName(Args(0))
newname = InputBox(vbNewLine & vbNewLine & "Новое имя без расширения :", "Переименование файла " & Args(0), fName)
If newname <> "" Then
newname = newname & "." & fExt
FSO.MoveFile Args(0), newname
End If
|
Last edited by Tol!k on Fri Mar 18, 2011 19:19; edited 1 time in total |
|