[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Manipulating strings in a Windows 2000 batch file.

Posted on 2004-04-07
5
Medium Priority
?
367 Views
Last Modified: 2007-12-19
I want to create a batch file that will take the current date, convert it to DDMMYY and the create a directory named ..../BACKUPDDMMYY and then be able to use the path to the directory in COPY/XCOPY statements.

Help!!

Simon.
0
Comment
Question by:simonk_klammer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Accepted Solution

by:
XionNET earned 750 total points
ID: 10779477
I was able to write one that would have the format DDMMYYYY in case you are interested. This will assign the date DDMMYYYY to %%date

for /f "tokens=1,2,3,4* delims=/ " %%i in ('date /t') do set date=%%k%%j%%l
0
 

Author Comment

by:simonk_klammer
ID: 10822432
Sorry.  I'm new to the forum.  Can I change the grade?
0
 

Expert Comment

by:jzanette
ID: 10840216
You might also try using the YYYYMMDD format as this will provide easier sorting.

The Mount/\Command "GetLogDate" is free and provides YYYYMMDD consistently across Windows versions (NT, 2000, XP and Server 2003).

For a better description, see (http://TheSystemGuard.com/MtCmds/GetValue/GetLogDate.htm).  To get the free Advanced NT/2K/XP/K3 Command Library, see (http://ntlib.com).
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question