Re: Re: Script to create folder named by date
- From: Jerold Schulman <Jerry@xxxxxxxxxx>
- Date: Wed, 27 Dec 2006 10:45:54 -0500
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:Here's a one liner:
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.
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
.
- Follow-Ups:
- Re: Script to create folder named by date
- From: ziminski@xxxxxxxxxxxxx
- Re: Script to create folder named by date
- References:
- Re: Script to create folder named by date
- From: Jerold Schulman
- Re: Script to create folder named by date
- From: ziminski
- Re: Script to create folder named by date
- Prev by Date: Re: VB script that deletes files from a folder based on certain dates
- Next by Date: Re: Adding Missing printer if they not there
- Previous by thread: Re: Script to create folder named by date
- Next by thread: Re: Script to create folder named by date
- Index(es):
Relevant Pages
|