Computer Learning Zone CLZ Access Excel Word Windows

Genius doesn't work on an assembly line basis... You can't simply say, "Today I will be brilliant."

-James T. Kirk
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
Home > TechHelp > Access >

Back to TechHelp

DOS alternative Upload Images   Link  
Sandra Truax 
5 months 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
5 months 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
5 months ago

Sandra Truax
5 months ago
Because of Richard's comment on a previous post I made. I attached the conversation.
Scott Axton
5 months 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
5 months ago
Previous post: DOS

This thread is now closed. If you wish to comment, start a NEW discussion, below.

Back to TechHelp Comments

Start a NEW Conversation
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
Subscribe to TechHelp
Get notifications when this page is updated

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

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

Copyright 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 11/28/2023 7:55:21 AM.