Search found 38 matches

by koko
21 Nov 2023 17:19
Forum: DOS Batch Forum
Topic: The timeout command blocks the W key from closing CMD window
Replies: 3
Views: 23083

Re: The timeout command blocks the W key from closing CMD window

Edit: sorry, overlooked the intent with the timeout tied to the key detection interrupt. Seems indeed any 'w' input from a command to the right of the timeout pipe is eaten, even if handled with something else like Powershell. Prior post below, edited a little: --- There's a Powershell way to detect...
by koko
02 Nov 2023 23:37
Forum: DOS Batch Forum
Topic: Is it worth learning Powershell?
Replies: 10
Views: 48771

Re: Is it worth learning Powershell?

It stuns me the hurdles to just running Powershell scripts. It's easier to run both a binary or batch script that launches Powershell than PS per se, which seems counter-intuitive if their goal was to encourage it as a replacement but I'm probably veering off-topic.
by koko
19 Jul 2023 11:56
Forum: DOS Batch Forum
Topic: Deleting files with sending them to Recycle Bin [SOLVED]
Replies: 8
Views: 8252

Re: Deleting but with sending items to Recycle Bin

But how can I effectively use Binit also outside of a BAT script, i.e. incorporate it to a daily and on the spot usage? You'd use it like any CLI program. I mean, that's what you're doing in the OP. I would have to write and always be running e.g. AHK script that would replace pressing of Delete ke...
by koko
19 Jul 2023 08:31
Forum: DOS Batch Forum
Topic: Deleting files with sending them to Recycle Bin [SOLVED]
Replies: 8
Views: 8252

Re: Deleting but with sending items to Recycle Bin

There's a CLI program called binit that sends things to the recycle bin. In my testing it handled all the Unicode characters I tried, unlike another program (CmdUtils) that I'd seen suggested elsewhere. Not open source fwiw. The author posted their motivation for creating it on Stack Overflow.
by koko
25 Apr 2023 08:31
Forum: DOS Batch Forum
Topic: Automatic folder creation and copying a file with specific extension
Replies: 2
Views: 3297

Re: Automatic folder creation and copying a file with specific extension

Based on the OP it sounds like you only want a copy of the singular 'build.a' file in the name of the 'Build_...' directory name, within a sibling top-level 'Result' directory. In which case the following works. Simply have the parent directory as the input of the script (eg: by dragging the directo...
by koko
25 Apr 2023 01:02
Forum: DOS Batch Forum
Topic: DEL oldfiles
Replies: 10
Views: 7634

Re: DEL oldfiles

There's a utility called byenow from the dev of Bvckup that is faster (some bechmarks of byenow/del/rmdir/robocopy appear on the page). May want to test it.

Edit: forgot it takes directories as inputs only.

Image
by koko
03 Oct 2022 05:48
Forum: DOS Batch Forum
Topic: Batch File to extract files from a zipped file
Replies: 13
Views: 19648

Re: Batch File to extract files from a zipped file

Fwiw 7-Zip, which has a useful and easy-to-use CLI binary, still supports XP according to their home page.
by koko
13 Nov 2020 00:27
Forum: DOS Batch Forum
Topic: DEL *this* file (whatever its name) in Batch File
Replies: 4
Views: 5503

Re: DEL *this* file (whatever its name) in Batch File

%0 is the full path of the script Nope. %0 contains how the script was called. Consider to have a "FOO.bat". From within a command prompt you could just enter FOO to run it. But in this case %0 expands to only FOO where deleting would fail. To expand it to the full path you have to use "%~f0" (incl...
by koko
24 Nov 2019 03:12
Forum: DOS Batch Forum
Topic: Soul Lapse : Strategy JRPG with campaign, relics, and evolutions
Replies: 3
Views: 5865

Re: Soul Lapse : Strategy JRPG with campaign, relics, and evolutions

Looks neat. Glad for the video. Some threads that aren't even particularly old have been affected by changes to image hosts, both with Photobucket changing their hotlinking terms and Tinypic ending which leads to many broken images but I'd imagine YT will stick around a bit.
by koko
06 Oct 2019 22:08
Forum: DOS Batch Forum
Topic: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)
Replies: 14
Views: 26514

Re: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)

Hi, At that time I had simply forgotten an endlocal which I had now inserted. Therefore, the pairs should always be turned on and off exactly. Very interesting. Quite a bit over my head :) Would someone mind explaining in which part the variables could be set for use under enableddelayedexpansion e...
by koko
06 Oct 2019 04:09
Forum: DOS Batch Forum
Topic: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)
Replies: 14
Views: 26514

Re: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)

There's still something wrong in you current version. The first argument consists of several paths. Updated both scripts. It now divides the input paths into new lines within the single arguments variable, then wraps each line in double quotes regardless of whether the path has spaces or not. The p...
by koko
05 Oct 2019 17:06
Forum: DOS Batch Forum
Topic: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)
Replies: 14
Views: 26514

Re: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)

Interesting! I'll keep that in mind. There's still something wrong in you current version. The first argument consists of several paths. Oops, must have been I tested the double quote pre-wrapping manipulation with a certain selection of those inputs that didn't reveal this mistake (I've also found...
by koko
05 Oct 2019 15:35
Forum: DOS Batch Forum
Topic: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)
Replies: 14
Views: 26514

Re: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)

Yes, unfortunately. The problem you are facing is still caused by the ampersand bug. If you drag/drop a file with the name you provided to a script that consists of nothing but @pause , the cmd will still crash. You don't even have any chance to access the cmdcmdline variable. Updated the scripts t...
by koko
05 Oct 2019 07:20
Forum: DOS Batch Forum
Topic: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)
Replies: 14
Views: 26514

Re: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)

Updated two lines to differently trim the args variable so it works properly for paths with ampersands and no spaces (a test I forgot to try until I was reminded of it by this topic). Edit: ampersands and alphanumeric by themselves are fine however after testing a path with no spaces with !§$%&()=`´...
by koko
01 Oct 2019 05:26
Forum: DOS Batch Forum
Topic: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)
Replies: 14
Views: 26514

Re: Thoughts on this alternative method of obtaining cmdcmdline arguments (safe for all characters?)

Yes, I got these as well when I tried posting a message about my updated version of which.exe last week. Looks like it's working without errors currently, so hopefully it's sorted :) In the meantime realized I hadn't accounted for paths without spaces in the initial 'new method' scripts (which obvi...