can someone point me in the right direction?

  • Thread starter Thread starter Bluu
  • Start date Start date
B

Bluu

was wondering if there were a newsgroup that could give
me some answers on the NT command interpreter?

im looking for a way to rename a directory to the same
name but adding the date to the end of the neame.

example:
directory is named [testfolder]
I would like to rename it to [testflodersun 11/30/03]

i would like to have the date portion of that name
obtained by the date function. that way there will be no
need for user input. it will just use the current days
date.

i know this is not the place to ask this question but
could smeone tell me where i could ask such a question
concerning nt command interpreter?

Thanx
Bluu
 
You can write the date to a file using
echo. |date>filename.ext
FOR /F "eol=E tokens=4,5* delims=, " %i in (date.txt) do echo %k

%k will be the date

Read help on for cos you can wrap the above in one line.
 
thank you for the answer to my question.
to be honest i dont understand it, but i will try to
figure it out. i was introduced to this stuff yesterday
so needless to say i am a bit ignorant at the moment.
thanx for the help.

is there a place i can get more details on things i have
questions for?

or is this the right place to ask?

thanx
Bluu
-----Original Message-----
You can write the date to a file using
echo. |date>filename.ext
FOR /F "eol=E tokens=4,5* delims=, " %i in (date.txt) do echo %k

%k will be the date

Read help on for cos you can wrap the above in one line.
message news:[email protected]...
was wondering if there were a newsgroup that could give
me some answers on the NT command interpreter?

im looking for a way to rename a directory to the same
name but adding the date to the end of the neame.

example:
directory is named [testfolder]
I would like to rename it to [testflodersun 11/30/03]

i would like to have the date portion of that name
obtained by the date function. that way there will be no
need for user input. it will just use the current days
date.

i know this is not the place to ask this question but
could smeone tell me where i could ask such a question
concerning nt command interpreter?

Thanx
Bluu

.
 
What you can't understand something so simple. How could you not instantly pick up %z%, %%i, %1, %~1, etc.



Guess you should scroll down a bit.










(took me an hour to get the syntax right - I hate this language)


Windows help has all the info

I went and did the hard work for you, but it can be optimised. As this is so boring I was leaving optimisation to you.

@echo off
echo. |date>date.txt
FOR /F "eol=E tokens=4,5,6,7,8* delims=/, " %%i in (date.txt) do Set Z=%%k-%%l-%%m
move "%~1" "%~1%Z%"
del date.txt

Make a batch file with these lines in it, drop a folder on it, folder renamed.

New Folder becomes New Folder01-12-2003

Can still be optimised, but this shits me and I'll call it quits while it works.
--
----------------------------------------------------------
http://www.g2mil.com/Dec2003.htm
thank you for the answer to my question.
to be honest i dont understand it, but i will try to
figure it out. i was introduced to this stuff yesterday
so needless to say i am a bit ignorant at the moment.
thanx for the help.

is there a place i can get more details on things i have
questions for?

or is this the right place to ask?

thanx
Bluu
-----Original Message-----
You can write the date to a file using
echo. |date>filename.ext
FOR /F "eol=E tokens=4,5* delims=, " %i in (date.txt) do echo %k

%k will be the date

Read help on for cos you can wrap the above in one line.
message news:[email protected]...
was wondering if there were a newsgroup that could give
me some answers on the NT command interpreter?

im looking for a way to rename a directory to the same
name but adding the date to the end of the neame.

example:
directory is named [testfolder]
I would like to rename it to [testflodersun 11/30/03]

i would like to have the date portion of that name
obtained by the date function. that way there will be no
need for user input. it will just use the current days
date.

i know this is not the place to ask this question but
could smeone tell me where i could ask such a question
concerning nt command interpreter?

Thanx
Bluu

.
 
I'm quite proud of that gobblygook.

--
----------------------------------------------------------
http://www.g2mil.com/Dec2003.htm
What you can't understand something so simple. How could you not instantly pick up %z%, %%i, %1, %~1, etc.



Guess you should scroll down a bit.










(took me an hour to get the syntax right - I hate this language)


Windows help has all the info

I went and did the hard work for you, but it can be optimised. As this is so boring I was leaving optimisation to you.

@echo off
echo. |date>date.txt
FOR /F "eol=E tokens=4,5,6,7,8* delims=/, " %%i in (date.txt) do Set Z=%%k-%%l-%%m
move "%~1" "%~1%Z%"
del date.txt

Make a batch file with these lines in it, drop a folder on it, folder renamed.

New Folder becomes New Folder01-12-2003

Can still be optimised, but this shits me and I'll call it quits while it works.
--
----------------------------------------------------------
http://www.g2mil.com/Dec2003.htm
thank you for the answer to my question.
to be honest i dont understand it, but i will try to
figure it out. i was introduced to this stuff yesterday
so needless to say i am a bit ignorant at the moment.
thanx for the help.

is there a place i can get more details on things i have
questions for?

or is this the right place to ask?

thanx
Bluu
-----Original Message-----
You can write the date to a file using
echo. |date>filename.ext
FOR /F "eol=E tokens=4,5* delims=, " %i in (date.txt) do echo %k

%k will be the date

Read help on for cos you can wrap the above in one line.
message news:[email protected]...
was wondering if there were a newsgroup that could give
me some answers on the NT command interpreter?

im looking for a way to rename a directory to the same
name but adding the date to the end of the neame.

example:
directory is named [testfolder]
I would like to rename it to [testflodersun 11/30/03]

i would like to have the date portion of that name
obtained by the date function. that way there will be no
need for user input. it will just use the current days
date.

i know this is not the place to ask this question but
could smeone tell me where i could ask such a question
concerning nt command interpreter?

Thanx
Bluu

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top