|
-
Mar 18th, 2000, 09:12 PM
#1
Thread Starter
Member
A part of the program im working on at the moment allows the user to rename files, but when they do this the file type is lost, can anyone tell me how to keep the file type, or even if it will work, how to keep the last 3 letters(filetype) of the old name.
-
Mar 18th, 2000, 10:25 PM
#2
Addicted Member
Dim OldName, NewName As String
'In OldName you store the old filname, for
'instance "test.txt"
'In Text1 the user inputs the new name, without the last three letters.
NewName = Text1.Text & Rigth(OldName, 4)
If OldName is "Test.txt" and the user writes "Newfile" in Text1 NewName will be "Newfile" & ".txt" = "Newfile.txt"
Hope it helps.
Pentax
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|