VB6.0 Renaming a batch font

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.