Author | Thread |
|
02/08/2007 06:38:12 AM · #1 |
Hopefully someone knows this, it'll save me a ton of time!!
I have 210 folders.
Each folder has a .ini file inside it.
I need to remove everything from each one of these files EXCEPT the lines beginning:
"Artist ="
"Name ="
"Delay ="
Is there a way to do that automatically? Thanks!
|
|
|
02/08/2007 06:44:26 AM · #2 |
Originally posted by Konador: Hopefully someone knows this, it'll save me a ton of time!!
I have 210 folders.
Each folder has a .ini file inside it.
I need to remove everything from each one of these files EXCEPT the lines beginning:
"Artist ="
"Name ="
"Delay ="
Is there a way to do that automatically? Thanks! |
Does the INI file have the same name in each folder? Are the contents the same in each folder?
~Terry
|
|
|
02/08/2007 07:11:04 AM · #3 |
The name of the ini is always the same, however the values inside are different.
Here is an example:
Originally posted by .ini #1: [song]
artist = Yellowcard
cassettecolor = #000000
name = Breathing
scores = 63657265616c310a340a646963740a6c6973740a7475706c6 |
and
Originally posted by .ini #2: [song]
delay = -1200
scores = 63657265616c310a370a646963740a6c6973740a7475706c650a340a6936323030330a69350
name = Seven Nation Army
artist = White Stripes
cassettecolor=#214533 |
Basically, I'd like to get rid of the scores variable, and keep everything else, but the string is slightly different in each one.
|
|
|
02/08/2007 07:16:46 AM · #4 |
|
|
02/08/2007 07:19:00 AM · #5 |
Yea, that's a tough one. Looks like some sort of application that should have been designed as a database from the start, instead of a collection of ini files!
The only way I can think of is to write some code (vb or whatever) to parse through all the folders, read the ini files, and strip out the unwanted lines. |
|
|
02/08/2007 07:25:43 AM · #6 |
I think UltraEdit can do that sort of thing with a macro, but what programming languages do you know eg. Java, Python, VB ? It should be possible to write a short program in any of the above. |
|
|
02/08/2007 09:03:31 AM · #7 |
textpad to the rescue! best little text editor ever.
you can do a find and replace in multiple documents, and you can use wildcards and -- if you're familiar with them -- regular expressions in your searching.
good luck. |
|
|
02/08/2007 10:45:24 AM · #8 |
BBEdit (Lite, also-I got free) will do this with its Find.
|
|
Home -
Challenges -
Community -
League -
Photos -
Cameras -
Lenses -
Learn -
Help -
Terms of Use -
Privacy -
Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 09/18/2025 10:23:30 AM EDT.