Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Как скрыть расширение файла при переименовании? 
Author Message
Tol!k



PostPosted: Fri Mar 18, 2011 19:03    Post subject: Reply with quote

А если скриптом?
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
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group