Search found 139 matches

by PAB
22 May 2023 12:00
Forum: DOS Batch Forum
Topic: [SOLVED] Make Minutes & Seconds output 2 Digits
Replies: 4
Views: 1694

Re: Make Minutes & Seconds output 2 Digits

Thanks jeb, that worked very nicely.

I managed to adapt and apply that to Part 1 of my Script, then to Part 2 of my Script, and then to add Part 1 & Part 2 together to come up with a total runtime for the whole Script.

Thanks again for your time, input, and explanations, it is very much appreciated.
by PAB
21 May 2023 11:59
Forum: DOS Batch Forum
Topic: [SOLVED] Make Minutes & Seconds output 2 Digits
Replies: 4
Views: 1694

Re: Make Minutes & Seconds output 2 Digits

You could prefix the values with "0" and take only the last two characters. set /a [Minutes]=%[T]% / 60 set "min=0%[minutes]%" set "min=%min:~-2%" echo %min_% Thanks jeb. I applied the method to the below but unfortunately it doesn't produce ANY results. I just used [ Get-WinUserLanguageList ] for ...
by PAB
20 May 2023 03:46
Forum: DOS Batch Forum
Topic: [SOLVED] Make Minutes & Seconds output 2 Digits
Replies: 4
Views: 1694

[SOLVED] Make Minutes & Seconds output 2 Digits

Good morning, It has been a LONG time since I was here last due to health issues and I have a problem which I just can't seem to solve. The below works great, except I would like the Minutes & Seconds to show as 2 digits instead of one. The program will run no longer than say 15 minutes so Hours are...
by PAB
15 Feb 2022 07:38
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 9896

Re: Condense Day-Date-Time Code for Reports.

Thanks again, MMM Is going to be the abreviated month (ex. Feb) MM is going to be the two-digit numeric month (ex. 02) I realise that, but when I used LOWER case, it gave me a two digit number, even though I used mmm . It's not a problem, I was just curious. I think this is what Squashman was reffer...
by PAB
15 Feb 2022 03:44
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 9896

Re: Condense Day-Date-Time Code for Reports.

Thanks for taking the time to reply Squashman. It also works for the SECOND Script, I just needed to use !Created! instead of %Created% . You would not need to use delayed expansion for the variable and all the other variables if you just got rid of the UNNECESARY parentheses. I don't quite understa...
by PAB
14 Feb 2022 21:03
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 9896

Re: Condense Day-Date-Time Code for Reports.

Thanks again for the reply. Brilliant, that works VERY nicely for the FIRST Script. It also works for the SECOND Script, I just needed to use !Created! instead of %Created% . That gets rid of so much code it is unbelievable. I will test further tomorrow because it is 03:14 a.m. GMT here and I need t...
by PAB
14 Feb 2022 20:25
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 9896

Re: Condense Day-Date-Time Code for Reports.

Thanks AR Coding for the reply, it is appreciated.

Yes, I am open to using PowerShell within CMD [ like you have ], but not pure PowerShell.

Unfortunately, that does not work. I assume that was specifically for the first Script?

Thanks again.
by PAB
14 Feb 2022 15:49
Forum: DOS Batch Forum
Topic: Condense Day-Date-Time Code for Reports.
Replies: 12
Views: 9896

Condense Day-Date-Time Code for Reports.

Good evening, I hope you are ALL well and staying safe. I have many Scripts that produce Reports, some single Scripts, and one that is menu driven and contains about 80+ Scripts. They ALL work great! On ALL of them, I like to have the output include WeekDay DD-MMM-YYY HH:MM:SS . So the typical outpu...
by PAB
13 Jan 2022 15:03
Forum: DOS Batch Forum
Topic: Use Checklist to Run Selected Commands.
Replies: 7
Views: 4424

Re: Use Checklist to Run Selected Commands.

I would just like to thank EVERYONE so much for their help on this. The above TWO codes do indeed run the Commands that I used just as an example. However, they both open the Commands and will NOT carry on until the Programs are closed, hence, I need to be at the computer until ALL the Commands have...
by PAB
13 Jan 2022 05:36
Forum: DOS Batch Forum
Topic: Use Checklist to Run Selected Commands.
Replies: 7
Views: 4424

Re: Use Checklist to Run Selected Commands.

Thank you both for your answers, it is appreciated. I tried Compo's method and it doesn't do what I want it to do. I adapted the code by adding some dummy Commands, but if I enter 'Y' for one of the Options, it runs ALL the Options below that Option automatically. @echo off %SystemRoot%\System32\cho...
by PAB
12 Jan 2022 13:05
Forum: DOS Batch Forum
Topic: Use Checklist to Run Selected Commands.
Replies: 7
Views: 4424

Use Checklist to Run Selected Commands.

Good evening, A VERY Happy New Year to one and all. I have a .bat file that runs several commands one after the other. If I do not want to run a particular Command[s], I have to manually comment out that/those Commands before running the Script. With this in mind, I decided to try and setup a checkl...
by PAB
13 Feb 2021 03:41
Forum: DOS Batch Forum
Topic: Put the End Time the computer will sleep.
Replies: 13
Views: 8646

Re: Put the End Time the computer will sleep.

Thanks again for the reply T3RRY , it is very much appreciated. I still can't get my head round how to get this to work. If I run the code it asks for the minutes, I enter those and press enter and I don't get the revised time. Thank you for the time and effort you have put into this. It is not impo...
by PAB
12 Feb 2021 04:26
Forum: DOS Batch Forum
Topic: Put the End Time the computer will sleep.
Replies: 13
Views: 8646

Re: Put the End Time the computer will sleep.

Thanks again for the reply T3RRY and detailed explanations, it is very much appreciated. I will have to leave this. I am a 60+ somebody who just likes doing things to keep my brain active. I am not a programmer in any way, but unfortunately this is beyond my capabilities. I did try and I just couldn...
by PAB
11 Feb 2021 16:42
Forum: DOS Batch Forum
Topic: Put the End Time the computer will sleep.
Replies: 13
Views: 8646

Re: Put the End Time the computer will sleep.

I have to input the minutes twice, and then after it has finished, a message briefly pops up. I had to add a pause to see the output. Here is the code . . . @Echo off Set /P "Minutes=Enter Minutes: " Call :Offset Minutes pause :Offset <Days| Minutes | Hours | Seconds> Echo(%*|%__APPDIR__%findstr.exe...
by PAB
11 Feb 2021 13:55
Forum: DOS Batch Forum
Topic: Put the End Time the computer will sleep.
Replies: 13
Views: 8646

Re: Put the End Time the computer will sleep.

Thanks again for the reply T3RRY, it is very much appreciated.

I couldn't get this to work in a Batch script because it didn't ask for the minutes to input.

Am I being a bit slow?