elentz Posted August 2, 2018 Share Posted August 2, 2018 I am looking for a way to take a "default" file and create copies of the default file and rename with the entries in a list in a text file. I will have about 100 entries in the list. Fishing for ideas. Thanks Quote Link to comment Share on other sites More sharing options...
requinix Posted August 2, 2018 Share Posted August 2, 2018 Besides copy()? What code do you have now, what are the files involved, and exactly what is the end result you're trying to get? Quote Link to comment Share on other sites More sharing options...
elentz Posted August 2, 2018 Author Share Posted August 2, 2018 No code yet I am looking for suggestions. I have a common config file that I will need to rename many times the common file name would change but the extension would stay the same. I will only need to do this once (I hope) Quote Link to comment Share on other sites More sharing options...
requinix Posted August 2, 2018 Share Posted August 2, 2018 Then copy. Like I linked to. Copy "from" the default file "to" the new file with whatever name you want it to be. Quote Link to comment Share on other sites More sharing options...
dalecosp Posted August 2, 2018 Share Posted August 2, 2018 Sounds an interesting use case. All in the same folder? 'Cause if the path is different, "config.php" (or 'myApp.ini' or something similar) at least has the distinction of being an appropriate name for a configuration file. I once created 65 sites in one day using logic files, templates, and a config munger that changed "config.php" to contain appropriate defaults for the DOCROOT they were in. One of my proud "not proud" moments, I guess. ?? Quote Link to comment Share on other sites More sharing options...
ginerjm Posted August 2, 2018 Share Posted August 2, 2018 Will all of these 'new' files have the exact same contents? Quote Link to comment Share on other sites More sharing options...
elentz Posted August 2, 2018 Author Share Posted August 2, 2018 ginerjim Yes It is a config file to tell a phone to go get updated firmware. The phone will only use its mac .cfg as its file. So I can make a "Master.cfg" file and I will have a list of mac addresses will need to be used to create individual .cfg files. All the files will be in the same directory when done. this is a PIA to say the least. Quote Link to comment Share on other sites More sharing options...
ginerjm Posted August 2, 2018 Share Posted August 2, 2018 IMHO - you s/b looking for how to make ONE config file work for multiple MAC addresses. Not the way you are doing it. Quote Link to comment Share on other sites More sharing options...
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.