fcjoe Posted September 21, 2009 Share Posted September 21, 2009 Hello, I have a compiled script that copies files from one location to another but skips certain file types; pictures, videos, temp files, etc... The script checks the extension of the file to determine if it should be copied or not. It works great but then I got a request to be able to update the file types that are excluded. Either adding to or removing file extensions from the list. I modified the script to read the excluded file extensions from a text file. The problem is people keep forgetting to copy that text file along with the script. This script is run on different computers everytime I want to just have one file (the compiled script) but still give people the ability to modify the list of excluded extensions and save the modifications. So if I start the script and it currently only exlcudes .jpg files. I want to be able to add .mp3 extension to the list and when I close the script, the next time I run it both extensions will be there (.jpg and .mp3) regardless of which computer I run it from. Is there anyway to do this? Thanks, Joe Link to comment Share on other sites More sharing options...
Developers Jos Posted September 21, 2009 Developers Share Posted September 21, 2009 Use an INI file with the provided INI functions? Jos 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...
fcjoe Posted September 21, 2009 Author Share Posted September 21, 2009 Use an INI file with the provided INI functions?JosJos,If I use an INI file they will need to remember to copy it along the compiled script. This would be the same problem that I currently have with the text file. I want to have only one file, the compiled script.Thanks,Joe Link to comment Share on other sites More sharing options...
Zedna Posted September 21, 2009 Share Posted September 21, 2009 Look at Autoit3Wrapper sources it uses UpdateResource API function calls but remember you can't modify EXE of current running proccess. As Jos said use INI files. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Developers Jos Posted September 21, 2009 Developers Share Posted September 21, 2009 You could create an INI with default setting when it isn't copied together with the program? Jos 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...
TurionAltec Posted September 21, 2009 Share Posted September 21, 2009 Search for the .INI file. If it doesn't exist, or is "old", download a copy from a central internet / intranet server using InetGet 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