Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 03:31 AM
тАО06-15-2004 03:31 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 03:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 04:00 AM
тАО06-15-2004 04:00 AM
Re: %Date%
cd\
cd c:\Program Files\Winzip
wzzip c:\backup\c%Date%.zip -r -p -t c:\Extra\*.*
So are you saying token should take the place of %date%
Thanks Again for your help in this.
Monty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 04:08 AM
тАО06-15-2004 04:08 AM
Re: %Date%
What i have posted earlier is how to pharse the date, month and year from the date and use it in the format u needed...
for your requirement it can be as follows..
cd\
cd c:\Program Files\Winzip
for /f "tokens=2,3,4 delims=/ " %%i in ('date /t') do (
set year=%%k
set month=%%i
set day=%%j
)
wzzip c:\backup\c%month%%day%%year%
.zip -r -p -t c:\Extra\*.*
Hope this helps..
Ganesh
Note:- Since u r new forums user.. u should also know about the point system..
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 04:09 AM
тАО06-15-2004 04:09 AM
Re: %Date%
If you're running 2000 or XP you can also use the internal variable %date% or %time% in your batch file.
for /f "tokens=2,3,4 delims=/ " %%i in ('echo %Date%') do (
set year=%%k
set month=%%i
set day=%%j
)
set tday=%month%%day%%year%
for /f "tokens=1,2,3 delims=:." %%i in ('echo %time%') do (
set hr=%%i
set min=%%j
set sec=%%k
)
set rnow=%hr%%min%%sec%
set outfile=mydata_%tday%_%rnow%.log
echo This is a log entry. >> %outfile%
or
echo Log entry created on %tday% at %rnow% >> mylogfile.log
Otherwise you have to use the date/t and time/t entries.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 04:13 AM
тАО06-15-2004 04:13 AM
Re: %Date%
I learnt about this statement from one of my senior administator before 2 yrs.. may be it is a kind of code known to many of the admins.
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 04:17 AM
тАО06-15-2004 04:17 AM
Re: %Date%
for /f "tokens=2,3,4 delims=/ " %%i in ('echo %date%') do (
does the following:
first the FOR statement looks at the delimiters '/' and ' ' (space) We have to take the output from the date command or variable and break it into usable chunks.
Tue 06/15/2004 is how the date displays. If we use a space as a delimiter, we can break off 'Tue' as one entry, then using the '/', break out '06' '15' and '2004'. Tokens refers to the position to start collecting the pieces from. In this case, we don't want 'Tue', so we start at the second position and take the three date parts (2,3,4) for month, day, year.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2004 05:52 AM
тАО06-15-2004 05:52 AM