How to Rename a File from English to Other Language?

rafeemd

New Member
Joined
Oct 18, 2011
Messages
12
I really hope someone can help me with this,
I have an excel file with some columns and one column having file name in English and other column having the filename in other language. Now i need to do is rename the file in other language, is it possible to rename.

Sample Data ID OldFileName NewFileName
1 Sales1.PDF తెలుగు1.PDF
2 Sales02.PDF తెలుగు02.PDF
3 Sales567.PDF తెలుగు567.PDF
4 dest67.PDF తెలుగు67.PDF

thanks in advance for any help.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
here's some VBA to help.

1. Put the code in a module
2. Put the name of the source file in Cell A1
3. Put the name of the destination file in Cell B1
4. Change the sDir to your path name (Set it to "", if the path is in A1 and B1)
5. Run "test"

Code:
Sub ChangeFileName(sFile, tFile)
    On Local Error GoTo errors
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    fs.Movefile sFile, tFile
    Set f = Nothing
    Exit Sub
errors:
    MsgBox "File: " & sFile & vbCrLf & Err.Description
    Err.Clear
End Sub
Sub test()
    Const sDir = "C:\temp\"
    ChangeFileName sDir & Range("A1").Value, sDir & Range("B1").Value
End Sub
 
Upvote 0
Thank you tlowry for your response and providing the code.

I have one doubt is the renamed file names will be displayed in Non English letters or in symbols. If they are displayed in symbols what to do to displaythem in Non English like Hindi, Tamil, other countries...

Thank you, please help me...
 
Upvote 0
I'm using Windows 7 and Excel 2000 and the characters appear to be correct with the exception of the VBA code module. So, in the spread sheet and the Windows Explorer the file names seemed to be correct.
 
Upvote 0
Hi tlowry, I need to import text files from a folder into an excel template. I am able to do it. The text file first line contains the column headings. But, is there is any possibility to check whether the text file columns are similar to excel, if not it is not required to import.

Thanks
 
Upvote 0
By definition text files do not have columns, unless you are referring to delimited text files. The most often used delimiter is a comma and these files usually have the extension "csv". The first line in a cvs can be column headings.

Excel is good at importing these files, but it is
not psychic. To determine what the headers are (if any), the file must be imported.

Don't even get me started on "columns are similar" checking with Excel, that requires human decision making.


If you are going to pursue this, I suggest you open another thread
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:DoNotOptimizeForBrowser/> </w:WordDocument> </xml><![endif]-->
 
Upvote 0

Forum statistics

Threads
1,215,416
Messages
6,124,774
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top