Jump to content
elentz

file name change help

Recommended Posts

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

Then copy. Like I linked to. Copy "from" the default file "to" the new file with whatever name you want it to be.

Share this post


Link to post
Share on other sites

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. ??

Share this post


Link to post
Share on other sites

Will all of these 'new' files have the exact same contents?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

IMHO - you s/b looking for how to make ONE config file work for multiple MAC addresses.  Not the way you are doing it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.