| View previous topic :: View next topic |
| Author |
Message |
JRoza Contributor


Joined: 17 Aug 2003 Posts: 182 Location: Netherlands
|
Posted: Sun Jan 02, 2005 12:37 am Post subject: Ini-files |
|
|
Working with ini-files is very easy in VDS, but I miss one function: deleting a key from the ini-file.
You can open and close the file, you can read from and write to it, but nowhere is a possibility to delete something from the inifile.
So to get that done I would have to read the file into a list, delete the one line I want out and write from the list again.
It would be nice if there would be a INIFILE DELETE, <section name>, <key name> that would really make life easier.
Or am I overlooking something?
Jan |
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Sun Jan 02, 2005 3:16 am Post subject: |
|
|
Hi JRoza,
If memory serves me correctly, ini.dsu will do the trick (or is it another name?). It may only delete sections? Still workable, though, I think.
I have the DSU in question in my possession, but unfortunately, I am in New Orleans for the weekend. Will return to Florida tomorrow and will dig it up for you (i.e.whatever the DSU is called)...
...that is, if someone out there does not beat me to it first...
Cheers,
- Boo |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Sun Jan 02, 2005 5:09 am Post subject: |
|
|
Thanks Tim6389! You rock.
In need a margarita...
Cheers!
- Boo |
|
| Back to top |
|
 |
JRoza Contributor


Joined: 17 Aug 2003 Posts: 182 Location: Netherlands
|
Posted: Sun Jan 02, 2005 10:49 am Post subject: |
|
|
Thanks guys!
That was quick.
And as I found out when downloading initdsu it already was in my download folder
Haven't tried out the unit yet, but will it also delete just one line in a section? Because that's what I want to achieve.
Jan |
|
| Back to top |
|
 |
JRoza Contributor


Joined: 17 Aug 2003 Posts: 182 Location: Netherlands
|
Posted: Sun Jan 02, 2005 11:01 am Post subject: |
|
|
I tried it out and YES this is what I needed.
It works fine, so thanks again guys.
Just going thru my download folder now to see what other unused goodies I still have in there
Jan |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jan 03, 2005 12:58 pm Post subject: Re: Ini-files |
|
|
| JRoza wrote: | Working with ini-files is very easy in VDS, but I miss one function: deleting a key from the ini-file.
You can open and close the file, you can read from and write to it, but nowhere is a possibility to delete something from the inifile.
So to get that done I would have to read the file into a list, delete the one line I want out and write from the list again.
It would be nice if there would be a INIFILE DELETE, <section name>, <key name> that would really make life easier.
Or am I overlooking something?
Jan |
This is something that has never been in VDS for no reason that I can think of, except that nobody thought to put it in and no-one pointed out the ommission. I've been using my own DSU for a while now, but the lack will be addressed in VDS 6, along with the ability to get a list of section names and all the values in a section.
And you'll be able to use XML files as a seamless replacement for INI files, as well! _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Mon Jan 03, 2005 1:12 pm Post subject: |
|
|
I found that using the registry is easier on the brain, it use's the RAM memory, saving wear on your hardrive, therefore much faster and smoother and less painfull once you do it a few times.
INI's are using the Registry anyways ... |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jan 03, 2005 1:23 pm Post subject: |
|
|
I prefer INIs as they are portable and can be backed up, they are easier to edit and view manually too.
The main advantages of the registry are that you aren't restricted to 64K of data, you can store binary data and CR-delimited strings there, and you automatically get separate storage for different users to keep their own settings independently. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Mon Jan 03, 2005 1:58 pm Post subject: |
|
|
I agree, sometimes I like to be able to just dbl click the INI to view, and the registrys nice because its like a mutlible file to open and see everything all organized numerically and alphabetically laid out style(I like the XP reg favorites, makes it easy to find things too).
I like them both too.  |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Mon Jan 03, 2005 2:16 pm Post subject: |
|
|
| Quote: | | This is something that has never been in VDS for no reason that I can think of, except that nobody thought to put it in and no-one pointed out the ommission. I've been using my own DSU for a while now, but the lack will be addressed in VDS 6, along with the ability to get a list of section names and all the values in a section. |
excellent jules
serge _________________
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Jan 03, 2005 2:34 pm Post subject: |
|
|
| jules wrote: | I prefer INIs as they are portable and can be backed up, they are easier to edit and view manually too.
|
Ummm,
What do you mean by portable? All 32bit windows versions have a Registry and are capable of reading INI files or am I missing something? VDS does not work under other OS'es.  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jan 03, 2005 5:29 pm Post subject: |
|
|
I mean that you can just copy them from one PC to another, or keep a copy on a floppy, zip or memory drive along with the program and transfer it from one computer to another. There's no easy way to move registry settings from one computer to another, you've got to use Regedit to export a file, and then import it back again. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
|