Search found 151 matches

by PAB
01 Jul 2025 00:34
Forum: DOS Batch Forum
Topic: Get set /p to accept file suffix.
Replies: 11
Views: 146

Re: Get set /p to accept file suffix.

Thank you SO much Steffen,

That's perfect. I wouldn't have got that in a million years.

Thanks again.
by PAB
30 Jun 2025 14:19
Forum: DOS Batch Forum
Topic: Get set /p to accept file suffix.
Replies: 11
Views: 146

Re: Get set /p to accept file suffix.

Thanks Steffen,

Yes, pre-pending the Asterisk and Decimal Point would be quite good although adding it in the set /p doesn't seem to work for me !

Thanks in advance.
by PAB
30 Jun 2025 04:16
Forum: DOS Batch Forum
Topic: Get set /p to accept file suffix.
Replies: 11
Views: 146

Re: Get set /p to accept file suffix.

Thanks again. Here is a cut down version of my code where .xls does not work but *.xls for example works great. @echo off setlocal EnableDelayedExpansion set "Suffix=" echo. & set /p "Suffix=>Enter the [Suffix File Type] starting with the [Asterix] followed by the [Decimal Point] and press <Enter>: ...
by PAB
30 Jun 2025 01:38
Forum: DOS Batch Forum
Topic: Get set /p to accept file suffix.
Replies: 11
Views: 146

Re: Get set /p to accept file suffix.

Thanks everyone for the replies. Yes, it does work if there is an Asterix and a Decimal Point at the beginning, but if you just put in .xls for example it doesn't ! I might try and look later to see if I can get it to automatically put in the *. in the set /p so the user doesn't need to. Thank again...
by PAB
29 Jun 2025 03:28
Forum: DOS Batch Forum
Topic: Get set /p to accept file suffix.
Replies: 11
Views: 146

Get set /p to accept file suffix.

Good morning, I am wanting to input a file suffix such as *.xls* [ includes decimal point and asterix ] into a set /p variable which will then get used within the script, but for some reason I can't get it to work. Here is the relevant part . . . set "User_Input=" set /p "User_Input=>Enter the 'File...
by PAB
24 Feb 2025 13:46
Forum: DOS Batch Forum
Topic: Put Desktop to sleep from Laptop
Replies: 5
Views: 5812

Re: Put Desktop to sleep from Laptop

Thanks for the reply miskox , Unfortunately that has nothing to do with my problem. The Desk_Sleep.bat on the Desktop computers Desktop runs correctly if I run it directly on the Desktop computers Desktop. What I need is to be able to run [EXECUTE] Desk_Sleep.bat from my Laptop. Thanks again.
by PAB
24 Feb 2025 06:58
Forum: DOS Batch Forum
Topic: Put Desktop to sleep from Laptop
Replies: 5
Views: 5812

Put Desktop to sleep from Laptop

Put Desktop to sleep from Laptop Good afternoon, I have managed to investigate, acquire, and adapt a script to wake-up my Desktop computer from my Laptop computer. My Desktop computer has a shared internal HDD and a shared USB connected HDD which are both available from my Laptop when I wake-up my D...
by PAB
24 Feb 2025 06:37
Forum: DOS Batch Forum
Topic: [SOLVED] Batch Script ignores folders with spaces
Replies: 8
Views: 7523

Re: [SOLVED] Batch Script ignores folders with spaces

Thanks for another version Lucky4Me.

Sorry I haven't replied earlier but I have been in hospital !
This being old is not all its cracked up to be !

Anyway, thank you VERY much again, it is appreciated.
by PAB
29 Jan 2025 19:10
Forum: DOS Batch Forum
Topic: [SOLVED] Batch Script ignores folders with spaces
Replies: 8
Views: 7523

Re: [SOLVED] Batch Script ignores folders with spaces

Thank you so much Lucky4Me for taking the time to help me. It is appreciated. BOTH codes work great. I will be using the 'Exclude' code as there are very few 'File Types' that are relevant to my needs. The 'Exclude' code also lists the files output in the selected directory in alphabetical order whi...
by PAB
29 Jan 2025 13:49
Forum: DOS Batch Forum
Topic: [SOLVED] Batch Script ignores folders with spaces
Replies: 8
Views: 7523

Re: [SOLVED] Batch Script ignores folders with spaces

Just one more question please if I may.

How can I get all files EXCEPT .jpg, .mp4 and .png.

Instead of . . .

Code: Select all

set "IFN=I:\Test\Paul\Paul No Way\*.*"
Or would it be something in here maybe ? . . .

Code: Select all

for %%f 
Thanks again in advance.
by PAB
28 Jan 2025 16:21
Forum: DOS Batch Forum
Topic: [SOLVED] Batch Script ignores folders with spaces
Replies: 8
Views: 7523

Re: Batch Script ignores folders with spaces

Good evening,

Can you hear that noise Lucky4Me ?
It is me slapping my weary old head.
It worked perfectly, thank you SO much.

Best Regards, Paul.
by PAB
28 Jan 2025 08:54
Forum: DOS Batch Forum
Topic: [SOLVED] Batch Script ignores folders with spaces
Replies: 8
Views: 7523

[SOLVED] Batch Script ignores folders with spaces

Good afternoon, I have this script which works great on folders that do NOT have any spaces in the filename . . . @echo off setlocal EnableDelayedExpansion set "IFN=I:\Test\Paul\Paul No Way\*.*" set "OFN=COPIED_to_SINGLE_FILE.log" if exist %OFN% (del /f /q %OFN% >nul 2>&1) echo %IFN% &:: This shows ...
by PAB
22 May 2023 12:00
Forum: DOS Batch Forum
Topic: [SOLVED] Make Minutes & Seconds output 2 Digits
Replies: 4
Views: 6001

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: 6001

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: 6001

[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...