Search found 564 matches

by miskox
09 Jun 2023 04:47
Forum: DOS Batch Forum
Topic: Combinations of N numbers in sets of K with R repeated elements
Replies: 9
Views: 3757

Re: Combinations of N numbers in sets of K with R repeated elements

Congratulations Antonio! I must admit that I don't understand what are you talking (writing) about but it was an interesting to read it. . . . Saso Mmm... Why is that? Although English is not my milk tongue, I try to write as clear as possible! When I have a doubt about my writting, I used a web tr...
by miskox
09 Jun 2023 04:43
Forum: DOS Batch Forum
Topic: nested IF statements, best practice (newbie question)
Replies: 5
Views: 2095

Re: nested IF statements, best practice (newbie question)

One of the options is (because looks like you don't have filenames changing all the time): set files_exist=0 if exist libiconv2.dll if exist libintl3.dll if exist libcharset1.dll set files_exist=1 and then you just check for 'files_exist' variable. You say all of the echoed messages are for troubles...
by miskox
07 Jun 2023 23:44
Forum: DOS Batch Forum
Topic: cmd-Terminal menu: How to iterate a number of spaces given in a variable into another variable?
Replies: 5
Views: 1853

Re: cmd-Terminal menu: How to iterate a number of spaces given in a variable into another variable?

You could use something like this: @echo off set text1=Some text&rem set text2=Some more text&rem set text3=Additional text&rem set field1=%text1% &rem 20 spaces set field2=%text2% &rem 25 spaces set field3=%text3% &rem 30 spaces set field1=%field1:~0,20% set field2=%field2:~0,25% set field3=%field3...
by miskox
03 Jun 2023 13:26
Forum: DOS Batch Forum
Topic: Combinations of N numbers in sets of K with R repeated elements
Replies: 9
Views: 3757

Re: Combinations of N numbers in sets of K with R repeated elements

Congratulations Antonio! I must admit that I don't understand what are you talking (writing) about but it was an interesting to read it. I am always amazed with the solutions you have (I remember that clever solution for that very loooong XML schema https://www.dostips.com/forum/viewtopic.php?f=3&t=...
by miskox
05 May 2023 07:07
Forum: DOS Batch Forum
Topic: create macro: Let's create a small handout with reports .
Replies: 17
Views: 5871

Re: create macro: Let's create a small handout with reports .

2jeb: thank you for this looong post of useful links. I will take a look at them too. I am having troubles understanding macros aswell. Will check them. I think it is time for me to try and use them.

Saso
by miskox
04 May 2023 06:55
Forum: DOS Batch Forum
Topic: Notepad bug
Replies: 10
Views: 9991

Re: Notepad bug

https://answers.microsoft.com/en-us/windows/forum/all/notepadexe-command-line-options/810760c1-a45a-4013-9544-1c1208e1b389 /A <filename> open file as ansi /W <filename> open file as unicode /P <filename> print filename /PT <filename> <printername> <driverdll> <port> print filename to designated prin...
by miskox
23 Mar 2023 12:27
Forum: DOS Batch Forum
Topic: Read window line from parent cmd without writing to file
Replies: 6
Views: 2744

Re: Read window line from parent cmd

Run pmon.exe only and post the results (between code tags, please).

Saso
by miskox
23 Mar 2023 06:24
Forum: DOS Batch Forum
Topic: Read window line from parent cmd without writing to file
Replies: 6
Views: 2744

Re: Read window line from parent cmd

What happens if you remove the 'start' command?

Code: Select all

for /f "usebackq tokens=2 delims=: " %i in (`pmon.exe ^|findstr /i "memory"`) do echo %i
Saso
by miskox
28 Feb 2023 06:41
Forum: DOS Batch Forum
Topic: If Exist then Delete
Replies: 1
Views: 1360

Re: If Exist then Delete

Add

Code: Select all

del /f /q F:\Finances\CSOB\XLK_WorkSheets2023\*.xlk
if you want to delete files first.

Saso
by miskox
08 Jan 2023 10:16
Forum: DOS Batch Forum
Topic: Exporting two keys from Registry residing in two different places on Windows 10
Replies: 9
Views: 17272

Re: Exporting two keys from Registry residing in two different places on Windows 10

Some changes to Lucky's solution: @echo off reg export "HKEY_CURRENT_USER\Console" "%userprofile%\Documents\CMD _ PowerShell Settings.reg" reg export "HKEY_USERS\S-1-5-21-3797103458-798797042-3558267449-1001\Console" "%userprofile%\Documents\1.reg" type "%userprofile%\Documents\1.reg" | find /v "Win...
by miskox
05 Jan 2023 05:23
Forum: DOS Batch Forum
Topic: How to loop through drive letters to run my script
Replies: 16
Views: 18648

Re: How to loop through drive letters to run my script

Here we see that both scripts are there. Go to command prompt and type: E:\Dropbox\AHK\AutoHotKey.ahk (and press RETURN) What happens? Does it return to the prompt immediately (while the script is still running)? E:\Dropbox\AHK\TextExpansion.ahk (and press RETURN) Is everything as expected? Create n...
by miskox
02 Jan 2023 08:53
Forum: DOS Batch Forum
Topic: How to loop through drive letters to run my script
Replies: 16
Views: 18648

Re: How to loop through drive letters to run my script

I suspect that your second .ahk file is not there (I guess you don't check for the existence of both .ahk files). Please execute this and provide the output: test.cmd: @echo off for %%f in (C D E F) do echo ---&dir %%f:\Dropbox\AHK\Autohotkey.ahk&dir %%f:\Dropbox\AHK\TextExpansion.ahk pause You coul...
by miskox
02 Jan 2023 08:49
Forum: DOS Batch Forum
Topic: Help with if / loop and variables
Replies: 9
Views: 26545

Re: Help with if / loop and variables

I agree with aGerman: user enters the data and all you have to do is use FIND or FINDSTR and check for ERRORLEVEL (or && / ||).

This is what you get for not providing all the information in the first place - solution to your problem might be completely different from your first approach.

Saso
by miskox
30 Dec 2022 00:45
Forum: DOS Batch Forum
Topic: How to loop through drive letters to run my script
Replies: 16
Views: 18648

Re: How to loop through drive letters to run my script

Again: see my previous posts: Errors you have are caused because path you have does not exist on every device you have. So you have to use the first version which checks the existence of the files. It is possible that .ahk runs and does not wait until it finishes? (I don't know how .ahk works) This ...
by miskox
29 Dec 2022 05:14
Forum: DOS Batch Forum
Topic: How to loop through drive letters to run my script
Replies: 16
Views: 18648

Re: How to loop through drive letters to run my script

It will go thru all the letters in the FOR command and PAUSE after *each* letter.

Saso