PC Review


Reply
Thread Tools Rate Thread

change the name of file to today's date

 
 
Dannis M
Guest
Posts: n/a
 
      19th Sep 2004
Hi All

I want to make a bat file which will make a copy of file in my server but
change the name of the file to today's date for example 091904.doc

thanx



 
Reply With Quote
 
 
 
 
David H. Lipman
Guest
Posts: n/a
 
      19th Sep 2004
You need to use a high level scripting language such as Kixtart (http://kixtart.org Kixtart
is CareWare) to perform that kind of functionality.

Dave



"Dannis M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| Hi All
|
| I want to make a bat file which will make a copy of file in my server but
| change the name of the file to today's date for example 091904.doc
|
| thanx
|
|
|


 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      20th Sep 2004

"Dannis M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All
>
> I want to make a bat file which will make a copy of file in my server

but
> change the name of the file to today's date for example 091904.doc
>
> thanx


Try this:

@echo off
@echo off
set d1=%date:~4%
set d2= %d1:/=%
ren xyz.doc %d2%.doc


 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      21st Sep 2004
I note that you advertise your services elsewhere, to support
Microsoft products. I now wonder about the quality of your
support, seeing that your advice in this particular thread was
well off the mark: Proposing to use a sledge hammer to crack
a little nut . . .


"David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
news:ObqLR$(E-Mail Removed)...
> You need to use a high level scripting language such as Kixtart

(http://kixtart.org Kixtart
> is CareWare) to perform that kind of functionality.
>
> Dave
>
>
>
> "Dannis M" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> | Hi All
> |
> | I want to make a bat file which will make a copy of file in my server

but
> | change the name of the file to today's date for example 091904.doc
> |
> | thanx
> |
> |
> |
>
>



 
Reply With Quote
 
David H. Lipman
Guest
Posts: n/a
 
      21st Sep 2004
Are you really that ...<CENSORED>

Maybe I am also schitzo and I all of a sudden went to England and then returned to the US
and Verizon.

Can't you tell when someone impersonates someone else !

And I do think that a HLL like Kixtart can handle it better than the batch interpreter in
the Command Prompt.

The REAL Dave !
~ ~ ~

Message-ID: <(E-Mail Removed)>
Disposition-Notification-To: David H. Lipman <(E-Mail Removed)>
Date: Tue, 21 Sep 2004 23:59:59 +0100
From: David H. Lipman <(E-Mail Removed)>
Reply-To: (E-Mail Removed)
Organization: Zionist Movement of United States (to eliminate palestinians from this planet)
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Subject: Problems with Microsoft products
X-Priority: 1 (Highest)
Content-Transfer-Encoding: 7bit
Newsgroups: microsoft.public.windowsxp.general
NNTP-Posting-Host: 217-72-173-64.pool.access.hc.th.virtelco.com 217.72.173.64
Path: TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Lines: 1
Xref: TK2MSFTNGP08.phx.gbl microsoft.public.windowsxp.general:1118128


Please be advised that with immediate effect, I am available to assist people with
difficulties with Microsoft products. I can be contacted on this email address:

(E-Mail Removed)

If you have any problems with Microsoft Products then contact me direct. There is no need
to post your queries on this newsgroup.

I hope I can be of help to you all.

David H Lipman



"Pegasus (MVP)" <(E-Mail Removed)> wrote in message
news:eb$(E-Mail Removed)...
| I note that you advertise your services elsewhere, to support
| Microsoft products. I now wonder about the quality of your
| support, seeing that your advice in this particular thread was
| well off the mark: Proposing to use a sledge hammer to crack
| a little nut . . .
|
|
| "David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
| news:ObqLR$(E-Mail Removed)...
| > You need to use a high level scripting language such as Kixtart
| (http://kixtart.org Kixtart
| > is CareWare) to perform that kind of functionality.
| >
| > Dave
| >
| >
| >
| > "Dannis M" <(E-Mail Removed)> wrote in message
| > news:(E-Mail Removed)...
| > | Hi All
| > |
| > | I want to make a bat file which will make a copy of file in my server
| but
| > | change the name of the file to today's date for example 091904.doc
| > |
| > | thanx
| > |
| > |
| > |
| >
| >
|
|


 
Reply With Quote
 
Chris
Guest
Posts: n/a
 
      21st Sep 2004
I don't know how you are proposing to run this batch file (manually, logon
script, from explorer, from a command prompt, etc), or what OSes you are
using but in Windows 2000 you could try something like:

SET DESTINATIONFOLDER=<put the path to the folder you want the file to end
up in here>

REM Set the filename variable to the %DATE% environment variable
SET MYFILENAME=%DATE%

REM Edit this variable to only include the last 10 characters of the date
REM (where %DATE% gives "Tue 21/9/2004" in my case - your date format may be
different)
SET MYFILENAME=%MYFILENAME:~-10%

REM Now edit the variable again to remove the "/"s from the variable
SET MYFILENAME=%MYFILENAME:/=%

REM If you ECHO %MYFILENAME% at this point you will get something like
"21092004"
REM So now copy the file (I'm assuming you pass it as an argument to the
batch file)
XCOPY %1 %DESTINATIONFOLDER%\%MYFILENAME%.doc

"Dannis M" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All
>
> I want to make a bat file which will make a copy of file in my server

but
> change the name of the file to today's date for example 091904.doc
>
> thanx
>
>
>



 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      21st Sep 2004
No, I can't tell that there may be two different David
H. Lipmans. I strongly object to the one who is trying
to flog his political ideas in this forum. I have a minor
technical disagreement with the one who suggests that
Kixtart is required to answer the question posed by
the OP in this thread. If they are two different persons
then I apologize to the one who first replied in this
thread: No slur was intended.

Kixtart is a very powerful product but I think it's over
the top for a problem that can be solved in three short
batch file lines.


"David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
news:(E-Mail Removed)...
> Are you really that ...<CENSORED>
>
> Maybe I am also schitzo and I all of a sudden went to England and then

returned to the US
> and Verizon.
>
> Can't you tell when someone impersonates someone else !
>
> And I do think that a HLL like Kixtart can handle it better than the batch

interpreter in
> the Command Prompt.
>
> The REAL Dave !
> ~ ~ ~
>
> Message-ID: <(E-Mail Removed)>
> Disposition-Notification-To: David H. Lipman <(E-Mail Removed)>
> Date: Tue, 21 Sep 2004 23:59:59 +0100
> From: David H. Lipman <(E-Mail Removed)>
> Reply-To: (E-Mail Removed)
> Organization: Zionist Movement of United States (to eliminate palestinians

from this planet)
> X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
> Subject: Problems with Microsoft products
> X-Priority: 1 (Highest)
> Content-Transfer-Encoding: 7bit
> Newsgroups: microsoft.public.windowsxp.general
> NNTP-Posting-Host: 217-72-173-64.pool.access.hc.th.virtelco.com

217.72.173.64
> Path: TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
> Lines: 1
> Xref: TK2MSFTNGP08.phx.gbl microsoft.public.windowsxp.general:1118128
>
>
> Please be advised that with immediate effect, I am available to assist

people with
> difficulties with Microsoft products. I can be contacted on this email

address:
>
> (E-Mail Removed)
>
> If you have any problems with Microsoft Products then contact me direct.

There is no need
> to post your queries on this newsgroup.
>
> I hope I can be of help to you all.
>
> David H Lipman
>
>
>
> "Pegasus (MVP)" <(E-Mail Removed)> wrote in message
> news:eb$(E-Mail Removed)...
> | I note that you advertise your services elsewhere, to support
> | Microsoft products. I now wonder about the quality of your
> | support, seeing that your advice in this particular thread was
> | well off the mark: Proposing to use a sledge hammer to crack
> | a little nut . . .
> |
> |
> | "David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
> | news:ObqLR$(E-Mail Removed)...
> | > You need to use a high level scripting language such as Kixtart
> | (http://kixtart.org Kixtart
> | > is CareWare) to perform that kind of functionality.
> | >
> | > Dave
> | >
> | >
> | >
> | > "Dannis M" <(E-Mail Removed)> wrote in message
> | > news:(E-Mail Removed)...
> | > | Hi All
> | > |
> | > | I want to make a bat file which will make a copy of file in my

server
> | but
> | > | change the name of the file to today's date for example 091904.doc
> | > |
> | > | thanx
> | > |
> | > |
> | > |
> | >
> | >
> |
> |
>
>



 
Reply With Quote
 
David H. Lipman
Guest
Posts: n/a
 
      21st Sep 2004
My apologies Pegasus...

I was REALLY ****ed off last night when the guy in the UK was posting as me. I know you are
one of the *best* here and it is a technical difference of a opinion. It is great to agree
to disagree as long as a solution is provided that the OP feels comfortable with. I am a
believer that there are not two sides to every coin -- there are three.

All the posts that I know of (and peers/friends have identified) have been pulled.

I believe that UseNet queries and answers belong in the News Group for the benefit of all.
I would never suggest emailing directly.

Sometimes it is important to look at the headers of posts. That is how differentiation can
be made. That's how I know the imposter is from the UK and I know you are in Australia.
I am on Verizon in the USA.

I also object to what was posted for the line item for "Organization". Not just because it
was used in "my name" but because it creates racial strife. What was stated is a view that
is opposite to my beliefs. It was more than political -- it was racist.

Dave






"Pegasus (MVP)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| No, I can't tell that there may be two different David
| H. Lipmans. I strongly object to the one who is trying
| to flog his political ideas in this forum. I have a minor
| technical disagreement with the one who suggests that
| Kixtart is required to answer the question posed by
| the OP in this thread. If they are two different persons
| then I apologize to the one who first replied in this
| thread: No slur was intended.
|
| Kixtart is a very powerful product but I think it's over
| the top for a problem that can be solved in three short
| batch file lines.
|
|
| "David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
| news:(E-Mail Removed)...
| > Are you really that ...<CENSORED>
| >
| > Maybe I am also schitzo and I all of a sudden went to England and then
| returned to the US
| > and Verizon.
| >
| > Can't you tell when someone impersonates someone else !
| >
| > And I do think that a HLL like Kixtart can handle it better than the batch
| interpreter in
| > the Command Prompt.
| >
| > The REAL Dave !
| > ~ ~ ~
| >
| > Message-ID: <(E-Mail Removed)>
| > Disposition-Notification-To: David H. Lipman <(E-Mail Removed)>
| > Date: Tue, 21 Sep 2004 23:59:59 +0100
| > From: David H. Lipman <(E-Mail Removed)>
| > Reply-To: (E-Mail Removed)
| > Organization: Zionist Movement of United States (to eliminate palestinians
| from this planet)
| > X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| > Subject: Problems with Microsoft products
| > X-Priority: 1 (Highest)
| > Content-Transfer-Encoding: 7bit
| > Newsgroups: microsoft.public.windowsxp.general
| > NNTP-Posting-Host: 217-72-173-64.pool.access.hc.th.virtelco.com
| 217.72.173.64
| > Path: TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| > Lines: 1
| > Xref: TK2MSFTNGP08.phx.gbl microsoft.public.windowsxp.general:1118128
| >
| >
| > Please be advised that with immediate effect, I am available to assist
| people with
| > difficulties with Microsoft products. I can be contacted on this email
| address:
| >
| > (E-Mail Removed)
| >
| > If you have any problems with Microsoft Products then contact me direct.
| There is no need
| > to post your queries on this newsgroup.
| >
| > I hope I can be of help to you all.
| >
| > David H Lipman
| >
| >
| >
| > "Pegasus (MVP)" <(E-Mail Removed)> wrote in message
| > news:eb$(E-Mail Removed)...
| > | I note that you advertise your services elsewhere, to support
| > | Microsoft products. I now wonder about the quality of your
| > | support, seeing that your advice in this particular thread was
| > | well off the mark: Proposing to use a sledge hammer to crack
| > | a little nut . . .
| > |
| > |
| > | "David H. Lipman" <DLipman~nospam~@Verizon.Net> wrote in message
| > | news:ObqLR$(E-Mail Removed)...
| > | > You need to use a high level scripting language such as Kixtart
| > | (http://kixtart.org Kixtart
| > | > is CareWare) to perform that kind of functionality.
| > | >
| > | > Dave
| > | >
| > | >
| > | >
| > | > "Dannis M" <(E-Mail Removed)> wrote in message
| > | > news:(E-Mail Removed)...
| > | > | Hi All
| > | > |
| > | > | I want to make a bat file which will make a copy of file in my
| server
| > | but
| > | > | change the name of the file to today's date for example 091904.doc
| > | > |
| > | > | thanx
| > | > |
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change date in excel from today to original date of file Nelson Microsoft Excel Misc 0 18th Sep 2009 07:08 AM
date in Cell to change colors if the date is beyond today's date Pete Elbert Microsoft Excel Misc 2 6th Jun 2009 06:31 AM
How do I change the colour of the bar at top of today's date? =?Utf-8?B?Q2hvcHM=?= Microsoft Outlook Calendar 1 30th Jul 2007 02:52 AM
Compare date, when date is today, change other fields =?Utf-8?B?VHhWaWNz?= Microsoft Access 1 30th Jun 2006 11:51 PM
How do I change the date for today in my calendar? =?Utf-8?B?bWlzc2dlbTJhcnRsb3Zlcg==?= Microsoft Outlook Calendar 1 1st Jun 2005 04:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:47 PM.