Computing.Net > Forums > Disk Operating System > remove colon and space from time/t

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

remove colon and space from time/t

Reply to Message Icon

Name: iamanogre
Date: October 12, 2006 at 04:16:50 Pacific
OS: dos 6.22
CPU/Ram: p 266
Comment:

I wish to use the time function as a folder name and I was wondering how can I remove the colon and the space from the output (e.g. --> 06:10 AM)

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: iamanogre
Date: October 12, 2006 at 06:06:44 Pacific
Reply:

Answered my own question

set hour=%time:~0,2%
if "%hour:~0,1%"==" " set hour=0%time:~1,1%
set folder=%date:~10,4%_%date:~4,2%_%date:~7,2%
set subfolder=%hour%_%time:~3,2%_%time:~6,2%
md c:\%subfolder%\


0

Response Number 2
Name: Mechanix2Go
Date: October 12, 2006 at 20:45:29 Pacific
Reply:

Not in DOS 6.22


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 3
Name: iamanogre
Date: October 13, 2006 at 09:08:11 Pacific
Reply:

found that out when I moved it to the target machines

using different idea now. Called a programmer
he was done in 10 minutes and laughed in my general direction.


0

Response Number 4
Name: Mechanix2Go
Date: October 13, 2006 at 23:47:02 Pacific
Reply:

Yeah, should be pretty simple for a real programmer. Might also get dome in BASIC or PERL.


=====================================
If at first you don't succeed, you're about average.

M2



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


path command entire drive i wrote a VNC client for ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: remove colon and space from time/t

TIme and date from a file www.computing.net/answers/dos/time-and-date-from-a-file/16911.html

Dos batch scripting www.computing.net/answers/dos/dos-batch-scripting/11369.html

Quantum Atlas 10K SCSI - Problem with Pa www.computing.net/answers/dos/quantum-atlas-10k-scsi-problem-with-pa/11051.html