Worf Posted April 11, 2009 Posted April 11, 2009 Hi. I have found that to get part of my program to do what i need it to do with causing proplems is to remove the file extention, do what needs to be done with the files and then put the file extention back. Now my program checks if the files are more than eight characters long, if so then reduce them down do only eight characters. Now the problem i have is that some times i get (Name..jpg or Name.jp.jpg), so i need to remove the extentions then replace the extentions after they have been shortend. How would this be done? Many Thanks Worf Quote
Administrators PlausiblyDamp Posted April 11, 2009 Administrators Posted April 11, 2009 The System.IO.Path class will do pretty much everything you are after in regard to manipulating file names. Out of interest is there a reason why you are truncating file names to eight characters? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Worf Posted April 11, 2009 Author Posted April 11, 2009 Out of interest is there a reason why you are truncating file names to eight characters? Hi PlausiblyDamp. Thank you for you reply. The reason i need to truncate the file names to eight characters is that the TXTSETUP.SIF only allows filenames of eight chars. I am writting a program that will allow you to customize Windows XP by integrating Wallpapers, Sound Schemes, Visual Styles, Registry entries ect directly into the Windows Source because at the moment you need to use $OEM$ folder to do this. I do have another problem but i will put up another post for that. Regards Worf Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.