vb6 - How to delete the filename? -


Use of VB6

I want to delete the last 5 words of file name, then give me Therefore the other file name is << / P>

code.

  name filename as NewFileName  

The above code is working to change the name, but I want to change the name, I will end the file name I want to delete 5 characters.

Expected output

file name

  sufeshcdk.txt - I (Sufhecd) only wants to move Modifyulla.txt - I only (Modifyul)  

How to do this?

VB6 code support is required.

Here you go.

  PrivateLink (filename) as the string RemoveLast5 (filename as string) & gt; 5 Then remove RemoveLast5 = left $ (FileName, Len (FileName) - 5) and RemoveLast5 = FileName end-end function DAM fileName = "Modifyulla.txt" as filename string NewFileName string as NewFileName = RemoveLast5 (FileName) NewFileName as FileName  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -