Search found 1973 matches

by penpen
18 Sep 2021 18:58
Forum: DOS Batch Forum
Topic: Drag and Drop batch file correction
Replies: 1
Views: 3296

Re: Drag and Drop batch file correction

I am not familiar with the command line arguments of the tool "ffmpeg".
Do you have a working sample line for a single file?

penpen
by penpen
05 Sep 2021 09:52
Forum: DOS Batch Forum
Topic: How to return ascii value in 'bg _Kbd'
Replies: 9
Views: 6691

Re: How to return ascii value in 'bg _Kbd'

The parameter "_Kbd" commands the bg.exe tool to read a character from the input buffer if present, else returns 0.
As this is clearly not what you (back_slash) are looking for, you should follow Steffen's suggestion to use "Kbd" instead.

penpen
by penpen
28 Aug 2021 13:20
Forum: DOS Batch Forum
Topic: How to make a custom mouse cursor in batch?
Replies: 16
Views: 10261

Re: How to make a custom mouse cursor in batch?

You might hook into an actual process which uses a console window, create a custom subclass overloading the actual "OnSetCursor()" function and replace the actual console instance with its subclass. But I'm pretty sure, that is highly risky, as you have no idea if someone else had the same idea and ...
by penpen
29 Jun 2021 06:02
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 12880

Re: Why does this run net1.exe?

I rechecked the results for the "netbios.dll"/"n<s" on my system with a path set to the test drectory only: Confirmed not executing "net.exe" in that scenario. (Maybe it's somehow is connected with the fact that i upgraded to win10 prof from win8.1 - but that's a shot into the blue.) Also, since "n<...
by penpen
28 Jun 2021 05:42
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 12880

Re: Why does this run net1.exe?

"no<<<<<" Launches notepad.exe, but in the top left corner of notepad window the icon does not look like notepad's. Also in the taskbar, the notepad window does not have the notepad icon. I'm betting the icon resource lookup doesn't recognize wildcards. According to "Process Monitor" (link in my fi...
by penpen
28 Jun 2021 05:30
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 12880

Re: Why does this run net1.exe?

On your system, what is the FIRST file returned from: DIR "%Windir%\System32\n<s.*" If you follow the 5 backtracking steps I showed, does it result in net.EXE ? On my system, the first file returned (of 12 files, including netbios.dll ) in DIR " C:\Windows\System32\n<s.* " is NarratorControlTemplat...
by penpen
27 Jun 2021 17:41
Forum: DOS Batch Forum
Topic: Why does this run net1.exe?
Replies: 15
Views: 12880

Re: Why does this run net1.exe?

It's likely there's a matching file ending in "4" on your system. Yes, the file "Netwuw04.dll" ends on the character '4'. Applying this to the OP's example (on my system): "n<z" While i agree with most you said, there is a nitpick. I have a file named "netbios.dll" in "C:\Windows\System32". Therefo...
by penpen
17 Jun 2021 09:28
Forum: DOS Batch Forum
Topic: Batch script to rename text files to match image files names.
Replies: 5
Views: 4240

Re: Batch script to rename text files to match image files names.

I am so sorry for making the above error and want to apologize.
I hope the /Y command wasn't preset in the COPYCMD variable,
so your test environment wasn't messed up.
Thanks to Squashman, for finding that error, i literally didn't see that.
I fixed the above code.
by penpen
15 Jun 2021 02:05
Forum: DOS Batch Forum
Topic: Batch script to rename text files to match image files names.
Replies: 5
Views: 4240

Re: Batch script to rename text files to match image files names.

This might help you (untested):

Code: Select all

@echo off
setlocal enableExtensions disableDelayedExpansion
pushd "Z:\Images\Converted\"
for %%a in (*.jpg *.psd) do copy "Placehold.txt" "%%~na.txt"
popd
goto :eof
penpen

Edit: Corrected critical error, thanks to Squashman for seeing that.
by penpen
10 Jun 2021 17:44
Forum: DOS Batch Forum
Topic: Get cursor position
Replies: 5
Views: 4659

Re: Get cursor position

Thanks to jeb, the cursor position could be read using the vt100 functionality with pure batch: https://www.dostips.com/forum/viewtopic.php?f=3&t=9454&p=61318#p61322 Sidenote: You could do the same using C# to compile an executable file, which is done in the first post... but then you better might w...
by penpen
01 Jun 2021 18:36
Forum: DOS Batch Forum
Topic: Check output of called Script
Replies: 3
Views: 3129

Re: Check output of called Script

I'm not sure i fully understand you: Except for exceptions that are able to completely abort batch file execution and the start-command used with specific arguments, that might open a new window, which might not be closed, nearly whatever programming logic you use in "Master_Batch.bat" shouldnt affe...
by penpen
30 May 2021 19:12
Forum: DOS Batch Forum
Topic: Unexpected DOS shell expansion of %~n1 and %~x1
Replies: 4
Views: 4632

Re: Unexpected DOS shell expansion of %~n1 and %~x1

The expansion of wildcards within batch- and for-variable-expansion and is normal and i'm also pretty sure it was discussed here somewhere, but at the moment i can't find it. However, if i remember right, then the reason why your specific solution works is because the doublecolon character is an Alt...
by penpen
29 May 2021 08:48
Forum: DOS Batch Forum
Topic: Need help
Replies: 24
Views: 12515

Re: Need help

Based on the first few files of the game i opened in notepad, i guess every file that contains an "echo" (no matter the case) might be a good candidate; assumed that the game main directory is located in "Z:", the following batch might help you to list them all: @echo off setlocal enableExtensions d...
by penpen
29 May 2021 06:09
Forum: DOS Batch Forum
Topic: Unexpected DOS shell expansion of %~n1 and %~x1
Replies: 4
Views: 4632

Re: Unexpected DOS shell expansion of %~n1 and %~x1

Wildcard expansion rules can be found here:
viewtopic.php?f=3&t=6207#p39420.

The "*.*" case doesn't go haywire at all - the first match in your cases is the actual directory (".").


penpen