Download a character package from the Internet, unzip later to see, found that the file name is this form: 0120_xxxxxx_gbk.ttf, looks very unsightly. I want to change it to xxxxxx. TTF This form, but the font has more than 300, manual modification is too waste of time, so write a batch modification program, one button to get it done. Functions and statements used primarily:Mid statement,Name statement,InStr function,instrrev function,Replace function
Here is the program I used to test. Although you can only change one at a time, but as long as the program slightly modified, you can change the program name according to your settings in bulk.
‘*************************************************************************
' * * Module name: Renaming a program
' * * Description: Blue Phoenix design Mall bath Fire Phoenix-Guo Wei | Blue Phoenix-Magic Spirit | Guo Wei-icecept
' * * Created by: Shower Fire Phoenix-Guo Wei
' * * Date: October 19, 2015 12:36:46
' * * Modified by: Shower Fire Phoenix-Guo Wei
' * * Date:
' * * Description: qq:493405998 | \ Wang: icecept
' * * Version: V1.0.0 | Http://blog.sina.com.cn/icecept
‘*************************************************************************
Option Explicit
Sub Main ()
Dim SS As String, ZZ As String
Dim before as Integer
Dim Behide as Integer
SS = Command
Before = INSTR (ss, "_")
MsgBox before
If before <> 0 Then
ZZ = mid$ (ss, before + 1)
MsgBox ZZ
End If
Behide = InStrRev (ZZ, "_")
MsgBox Behide
If behide <> 0 Then
mid$ (ZZ, behide, 4) = "Simplified" & space$ (2)
ZZ = replace$ (ZZ, space$ (1), "")
MsgBox ZZ
End If
Name SS as ZZ
End Sub
VB6.0 Renaming a batch font