Clay Posted August 1, 2008 Share Posted August 1, 2008 Why do I always have the bad luck .... Of this is simple, I am just trying to understand why. So a friend of mine has a script and in it he is using iniread to read an ini style section from a file with a .cfg extension..... When I do the same thing I returned my default which is an empty string... and this will just not work for me unless I change the file extension to .ini Does anyone know why this would be? Also, I don't think that Autoit has a file rename function, does anyone know how to change a file extension short of through FileMove? Link to comment Share on other sites More sharing options...
Valiante Posted August 1, 2008 Share Posted August 1, 2008 FileMove is generally used as a rename function. Specify the same target location, but with the new file name. Eg. FileMove("C:\Temp\file.cfg", "C:\Temp\file.ini") Link to comment Share on other sites More sharing options...
Developers Jos Posted August 1, 2008 Developers Share Posted August 1, 2008 Tell your friend that it should work fine.... more help will need more info SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Monamo Posted August 1, 2008 Share Posted August 1, 2008 Why do I always have the bad luck ....Of this is simple, I am just trying to understand why. So a friend of mine has a script and in it he is using iniread to read an ini style section from a file with a .cfg extension..... When I do the same thing I returned my default which is an empty string... and this will just not work for me unless I change the file extension to .iniDoes anyone know why this would be? Also, I don't think that Autoit has a file rename function, does anyone know how to change a file extension short of through FileMove?The INI data structure is all that should be relevant. The IniRead() function doesn't care what your file extension is. You could have an extension of .purplemonkeydishwasher and it shouldn't matter as long as the data is sound. I typically/reflexively create a .dat extension for my settings files w/ no issue reading the ini layout.As for renaming, FileMove() is the only method I'm aware of offhand (short of using Run() command prompt for the DOS method). - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now