Computer Learning Zone CLZ Access Excel Word Windows

Groovy!

-Ash Williams
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to TechHelp    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
DOS alternative
Sandra Truax 
         
3 years ago
I still use DOS to open folders by year and month as follows (along with other tasks).  What is a better alternative to using the below DOS code?

For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)

set year=%date:~10,4%
set month=%date:~4,2%
set day=%date:~7,2%
set filename=%year%_%month%_%day%

start %windir%\explorer.exe "d:\j\%YEAR%\%MONTH%"
Alex Hedley  @Reply  
           
3 years ago
> What is a better alternative to using the below DOS code?

Why do you need an alternative?

Could use .NET, PowerShell, python, anything'
Sandra Truax OP  @Reply  
         
3 years ago

Sandra Truax OP  @Reply  
         
3 years ago
Because of Richard's comment on a previous post I made. I attached the conversation.
Scott Axton  @Reply  
        
3 years ago
Sandra I believe that you can use the DatePart function to build up your variable parts for the Y/M/D.  Then just concatenate them together to replace the
"d:\j\%YEAR%\%MONTH%" part of your

I know you aren't there yet but Richard starts covering the File System Object Starting in Developer 33 and continues on in 34 and 35.  Those may be of use (eventually).  

One thing I would add is, "If it ain't broke, why fix it?".  I don't see an issue with how you are doing it now.
Alex Hedley  @Reply  
           
3 years ago
Previous post: DOS

This thread is now CLOSED. If you wish to comment, start a NEW discussion in TechHelp.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/8/2026 4:06:12 AM. PLT: 0s