Announcement

Collapse
No announcement yet.

Using %Date% not working correctly in 2003 Server

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using %Date% not working correctly in 2003 Server

    Hi All

    I'm using a simple xcopy to copy the contents of a folder to another folder which uses the %Date% to name the folder with the current system date, however the result is an embedded date path.

    Here's the line of script I'm using

    J:\path to files to be copied J:\path to location to place files\%date% /V /I /S

    Here's how the files are saved:

    J:\path to location to place files\27\11\2006\

    So its splitting the date into 3 folders 27, 11 & 2006 respectively. As I need users to access these files I need the date like this 27112006 or similar.

    Can anyone assist please?
    The Univurse is still winning!

    W2K AD, WSUS, RIS 2003. ISA also AVG Server
    ** If contributors help you, recognise them and give reputation points where appropriate **

  • #2
    Re: Using %Date% not working correctly in 2003 Server

    Not being a scripting guru the onyl way I found to resolve it is to change the format of the date on the server:

    http://support.microsoft.com/kb/307938

    Change the date format to dd-mm-yyyy.

    ** Note - It says it's for XP but works on 2003 as well **

    Not ideal but it's a work around untill someone posts a decent way of doing it.

    Michael
    Michael Armstrong
    www.m80arm.co.uk
    MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment


    • #3
      Re: Using %Date% not working correctly in 2003 Server

      Thanks Michael.

      I don't think it would be much of a deal to change it. It's just a stand alone file server. Appriciate the quick responce
      The Univurse is still winning!

      W2K AD, WSUS, RIS 2003. ISA also AVG Server
      ** If contributors help you, recognise them and give reputation points where appropriate **

      Comment

      Working...
      X