Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to get months as letters and years in four digits in DIR?

digits DIR letters months
0
Posted

How to get months as letters and years in four digits in DIR?

0

Using 4DOS, you can write your own DIR command with customized display. Assuming you want to see the 8.3 filename, filesize, filedate as above for the parameter (%1) of your customized command, you could write (%= is the line continuation var): ::MYDIR.BTM FOR /A:-d %fn IN (“%1”) DO ( SET fnd=%@FILEDATE[“%fn”] SET mon=%@WORD[%@MONTH[%fnd],x Jan Feb Mar Apr May Jun %= Jul Aug Sep Oct Nov Dec] SET year=%@EVALl[%@YEAR[%fnd] + %@IF[%@YEAR[%fnd] ge 80 %= . AND. %@YEAR[%fnd] le 99,1900,2000]] ECHOS %@SFN[%fn] %@REPEAT[%@CHAR[255],%= %@EVAL[15-%@LEN[%@SFN[%fn]]]] ECHOS %@FORMAT[10.10,%@FILESIZE[%fn]] ECHO %@RIGHT[2,0%@DAY[%fnd]]/%mon/%year ) This is slow, but much faster than working with external utils in a saved-to-disk file and displaying the results.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123