Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Create directory with current date

Posted on 2004-08-24
6
Medium Priority
?
2,347 Views
Last Modified: 2007-12-19
Hi,

I'm trying to create a directory with the name as the current date in format yyyymmdd, can anybody tell me how to do this?

Thanks
0
Comment
Question by:ChristopheLamarliere
[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
  • 2
6 Comments
 
LVL 10

Expert Comment

by:For-Soft
ID: 11879621
What operating system are you using?
0
 

Author Comment

by:ChristopheLamarliere
ID: 11883983
XP Pro
0
 
LVL 10

Accepted Solution

by:
For-Soft earned 100 total points
ID: 11884534
You can find solution here:
http://www.experts-exchange.com/Operating_Systems/MSDOS/Q_21081302.html

Or, you can use %DATE% variable with substring syntax:
%DATE:~0,2%
To see details use SET /?
0
 
LVL 1

Assisted Solution

by:shanekelly_7
shanekelly_7 earned 100 total points
ID: 11923398
Here it is In Batch Script:-

::-------Start of Code--------::
@echo off
set y=%date:~-4%
set m=%date:~3,2%
set d=%date:~0,2%
set a=%y%%m%%d%
mkdir C:\<Path>\%a%
::----------End of Code-------::
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
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. …
Suggested Courses

609 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