Computer Learning Zone CLZ Access Excel Word Windows

Live as if you were to die tomorrow. Learn as if you were to live forever.

-Mahatma Gandhi
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Access >
Back to TechHelp    Comments List
DOS alternative Upload Images   Link   Email  
Sandra Truax         
16 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             
16 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 OP         
16 months ago

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

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

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 10/6/2024 11:33:47 PM. PLT: 1s