Re: Re: Script to create folder named by date

Tech-Archive recommends: Speed Up your PC by fixing your registry



On 27 Dec 2006 06:54:59 -0800, ziminski@xxxxxxxxxxxxx wrote:



On Dec 26, 7:54 am, Jerold Schulman <J...@xxxxxxxxxx> wrote:
On Mon, 25 Dec 2006 20:35:00 -0800, Pakeon <Pak...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hello,

I would like to schedule a copy file operation in .cmd to copy files from
one server to another one on daily basis. On the target server, I want to
create folder as YYYYMMDD format by the script to store the files so that it
can be easily distingushed. I know there is %date% but it returns MM/DD/YYYY,
not the format I want.

Please help!This will work on Windows 2000, Windows XP, Windows Server 2003, and Windows Vista.

Here's a one liner:
for /f "Tokens=2-4 Delims=/ " %%i in ('date /T') do set
FileDate=%%k%%i%%j

Your script DOES NOT work on Windows XP, Windows Server 2003, and Windows Vista.
All version of Windows NT greater than Windows NT 5.00 do not include the Day when running the Date /T command.

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
.



Relevant Pages

  • Re: Windows/Macro Language Info?
    ... The point is that malware is often using Windows _features_. ... I totally understand the difference between client and server side (and you ... subverted by script code (the facilities to change file size, dates, etc. ...
    (comp.lang.cobol)
  • RE: NFS on w2k3 server question
    ... new Windows 2K3 server and it will work properly after migrating from ... Window NT4.0 to Windows 2K3. ... logon script migration is specific to how the logon ... it is recommended that you contact Microsoft Customer Support ...
    (microsoft.public.windows.server.migration)
  • Re: Windows 2008 Limitlogin
    ... We are using windows 2008 64 bit Enterprise, we are trying to limit concurrent user login using limit login but unfortunetely always fail. ... I'm one of the people that Paul was referring to who has written a script to control concurrent sessions. ... It currently prevents regular users from logging in more than once by first warning them of where their other session exists and then uses WMI to log the user off forcefully. ... For admins who log in to Windows Server, a separate perl script that ties into a 3rd party perl module must be used because for some reason WMI on Server is ignored. ...
    (microsoft.public.windows.server.active_directory)
  • RIS prestaging problem
    ... When trying to prestage Windows XP clients in a Windows 2003 Server ... The script also sets the Remote ...
    (microsoft.public.win2000.setup)
  • Re: Finding duplicate files
    ... obviously not going to be tolerated by Windows. ... The directory structure in question resides on a Fedora Core 4 server. ... rename files that would clash on windows with some significant and visually ... The following script produces a shell script which, ...
    (comp.unix.shell)