Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Is it possible to rename html file automtaically

    This is the first time I am posting a message on this forum. I am webmaster for a library. We update our homepage every week with new promotions. When I take time off, I create several weeks worth of index pages and name them as index_Feb30.html, etc. Then I ask my boss to rename the page to index.html on the monday of the week, so it overwrite the existing index page. Like this it also keeps the hyperlinks.

    I was thinking if I can write a java script function to check if the day is Monday(for example: Feb 30), then get index_feb30.html and rename the file to index.html. This way I don't have to ask anybody to do it.

    I thought about redirecting but that way I will loose the links.

    Please help. Let me know if there is anyother way of doing this.

    Thanks in advance

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    javascript can't alter anything on a file. Nut since your a webmaster you presumably got a server and server languages can alter things on files.

  • #3
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Any suggestion?

    Thank You. Do you have any suggestion?

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    What you can do is, make an index page with some php or asp, or whatever server side language is available that redirects the person to the appropriate page on the given date.
    OracleGuy


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •