Search found 227 matches

by jfl
10 Jan 2023 12:44
Forum: DOS Batch Forum
Topic: New in.exe and with.exe commands for the Windows cmd shell
Replies: 0
Views: 33392

New in.exe and with.exe commands for the Windows cmd shell

Hello, I've published an updated version of my System Tools Library , including two new tools for the cmd.exe shell: in.exe: Execute a command in a different directory, then come back. Avoids having to remember to run popd afterwards. Ex: `in .. cd` displays the full name of the parent directory: C:...
by jfl
10 Dec 2022 08:23
Forum: DOS Batch Forum
Topic: DOS search for file contents? Like Grep
Replies: 2
Views: 7412

Re: DOS search for file contents? Like Grep

The ideal tool for that is ag.exe, aka. The Silver Searcher. See the tool description in its home page on GitHub . (The first half describes the specificities of that Windows version; The second half describes ag features for both Unix and Windows.) You can install it using winget: winget install "T...
by jfl
05 Dec 2022 04:12
Forum: DOS Batch Forum
Topic: Copy wild*.tsv files loop subfolders
Replies: 1
Views: 1945

Re: Copy wild*.tsv files loop subfolders

If your goal is to have a copy of the files in each and every subfolder, the command would be:

Code: Select all

for /d %d in (C:\customers\subfoldernames\*) do copy *.tsv "%d"
The for /d option makes it loop on directories.
Then the copy command is repeated for each target directory.
by jfl
04 Dec 2022 08:22
Forum: DOS Batch Forum
Topic: Delete paths in system environment variables
Replies: 4
Views: 7411

Re: Delete paths in system environment variables

There is a useful script called paths.bat in my System Tools Library that can help you do that: https://github.com/JFLarvoire/SysToolsLib/releases/latest/download/SysTools.zip When invoked without any option, the paths.bat script displays the current PATH with 1 pathname per line. This makes it cons...
by jfl
21 Apr 2022 05:13
Forum: DOS Batch Forum
Topic: ZeroKs 0 KB file compression
Replies: 8
Views: 8628

Re: ZeroKs 0 KB file compression

but the "ZeroKs compression" would actually work in a corporate environment where data is on a server with NTFS datastroage. If it does work, then it's an NTFS quota bug! That's why I asked if he had really tried it: I'd be surprised if Microsoft had left such a severe bug in their file system, but...
by jfl
15 Apr 2022 06:33
Forum: DOS Batch Forum
Topic: ZeroKs 0 KB file compression
Replies: 8
Views: 8628

Re: ZeroKs 0 KB file compression

I'm afraid you don't understand that creating a file on disk requires allocating data to describe your file characteristics (pathname, create time, access rights, etc.). This is called "meta-data" about the file. Here, you're converting N KB of data to X*N KB of meta data, with X >> 1. So 1) You're ...
by jfl
13 Apr 2022 07:28
Forum: DOS Batch Forum
Topic: batch file code delete stubborn file ?
Replies: 3
Views: 5042

Re: batch file code delete stubborn file ?

What do you mean by stubborn file? Before going through complex and risky procedures like updating group policies, it'd be easier if we knew more about what you did, and what error messages you got. The most common cases are - A read-only file - A file for which you don't have the necessary user rig...
by jfl
13 Apr 2022 07:07
Forum: DOS Batch Forum
Topic: Generating consecutive dates
Replies: 3
Views: 6378

Re: Generating consecutive dates

Aacini's algorithm does not calculate the date N days away. It displays N consecutive dates forwards (N positive), or backwards (N negative), starting at the given date. If you want N consecutive dates 1 to N days away, simply reverse the echo and set instructions in the inner-most loop blocks. And ...
by jfl
31 Mar 2022 02:54
Forum: DOS Batch Forum
Topic: progress bar while copying (xcopy)
Replies: 4
Views: 9062

Re: progress bar while copying (xcopy)

I did not not about esentutl.exe, thanks for the tip. But I just gave it a try, and (disappointingly) it does not work with network drives. (Which is the main case for which I need progress bars: When copying big files back and forth between my laptop at home and servers in the office.) The error sa...
by jfl
29 Mar 2022 10:37
Forum: DOS Batch Forum
Topic: How to run Internet Explorer in Windows 11
Replies: 1
Views: 4000

How to run Internet Explorer in Windows 11

Microsoft has removed Internet Explorer in the latest releases of Windows 11... Or have they? Actually after a few days of panic, I understood that they haven't really. What they've changed is that the iexplore.exe program now starts Edge instead of Internet Explorer. For those of you who have shame...
by jfl
16 Feb 2022 07:30
Forum: DOS Batch Forum
Topic: Wmic.exe
Replies: 26
Views: 28335

Re: Wmic.exe

If they really remove it, I'm afraid we won't have a choice. Maybe we could write a wmic.bat front end to PowerShell, allowing to easily replace all wmic.exe commands by equivalent 'call wmic.bat' commands? Also, the justification they gave for the removal sounds poor at best: If they remove wmic.ex...
by jfl
16 Feb 2022 07:16
Forum: DOS Batch Forum
Topic: [How-To] HEX dump raw data of a drive sector (PowerShell hybrid)
Replies: 12
Views: 12205

Re: [How-To] HEX dump raw data of a drive sector (PowerShell hybrid)

Thank you, Jean-Francois, for your time! Steffen right, really powerful pack for all cases of life, works very fast! I've been trying use it since yesterday but haven't found an option of one line outputing... For example, I need to dump first 32 bytes of MBR sector which is counted as dec, not hex...
by jfl
09 Feb 2022 12:16
Forum: DOS Batch Forum
Topic: [How-To] HEX dump raw data of a drive sector (PowerShell hybrid)
Replies: 12
Views: 12205

Re: [How-To] HEX dump raw data of a drive sector (PowerShell hybrid)

Doing this in a script is an impressive achievement... But calling the WIN32 APIs directly in C is far more efficient! My old sector.exe tool, available in the System Tools Library , allows dumping disk sectors as hexadecimal, copying them to and from files, etc. I've even used it multiple times to ...
by jfl
24 Jan 2022 04:56
Forum: DOS Batch Forum
Topic: [How To] Just another code with examples of VT (ANSI) escape sequences
Replies: 2
Views: 3206

Re: [How To] Just another code with examples of VT (ANSI) escape sequences

Excellent! I did not expect most of them to also work in the old console. What's the minimum version of Windows where all this will work? (In Windows 11, even those flagged "still buggy in Console" do work fine there.) Also I had never seen that method for generating the CR character. Is this faster...
by jfl
24 Jan 2022 03:58
Forum: DOS Batch Forum
Topic: Enabling TCPIP
Replies: 4
Views: 3538

Re: Enabling TCPIP

PowerShell would probably be the good choice, as it has a rich set of network management functions. But in Windows XP you're limited to PowerShell v2, so I don't know how much is there yet. In the old cmd shell, you have the choice of netsh.exe, and wmic.exe (Ex: wmic nicconfig /?). Both are powerfu...