Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.comp.os.windows-10 > #186290 > unrolled thread

Creating new files of indeterminate sort?

Started by"J. P. Gilliver" <G6JPG@255soft.uk>
First post2025-07-28 12:39 +0100
Last post2025-07-28 17:21 +0200
Articles 20 on this page of 38 — 9 participants

Back to article view | Back to alt.comp.os.windows-10


Contents

  Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 12:39 +0100
    Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-28 08:18 -0400
      Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 16:46 +0100
        Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 18:51 +0200
          Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 19:10 +0100
            Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 22:18 +0200
              Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 01:37 +0100
                Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 09:10 +0200
                  Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 18:46 +0100
                    Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-29 13:58 -0400
                    Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 20:21 +0200
                      Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-29 15:20 -0400
                        Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 21:47 +0200
                          Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 22:38 +0100
                            Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 08:57 +0200
                          Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-29 22:02 -0400
                            Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 09:54 +0200
                          Re: Creating new files of indeterminate sort? Philip Herlihy <nothing@invalid.com> - 2025-07-30 14:24 +0100
                            Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 09:55 -0400
                            Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-30 13:44 -0400
                              Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 23:33 -0400
                Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 10:03 +0200
                  Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 10:15 +0200
                  Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 22:51 +0100
                    Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 09:42 +0200
                      Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 10:02 -0400
                        Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 17:04 +0200
                      Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-30 21:49 +0100
                    Re: Creating new files of indeterminate sort? Mark Lloyd <not.email@all.invalid> - 2025-07-30 18:15 +0000
                      Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 23:37 -0400
      Re: Creating new files of indeterminate sort? Chris <ithinkiam@gmail.com> - 2025-07-29 06:26 +0000
        Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-29 12:06 -0400
    Re: Creating new files of indeterminate sort? Philip Herlihy <nothing@invalid.com> - 2025-07-28 13:40 +0100
      Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-28 12:43 -0400
    Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 14:49 +0200
    Re: Creating new files of indeterminate sort? "Alan K." <alan@invalid.com> - 2025-07-28 08:53 -0400
    Re: Creating new files of indeterminate sort? Herbert Kleebauer <klee@unibwm.de> - 2025-07-28 17:01 +0200
      Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 17:21 +0200

Page 1 of 2  [1] 2  Next page →


#186290 — Creating new files of indeterminate sort?

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-28 12:39 +0100
SubjectCreating new files of indeterminate sort?
Message-ID<1067nhn$21tqk$2@dont-email.me>
Is there any way to add something of the sort to the "New ..." menu in
File Manager?

I recently wanted to create a .css file, for example. The only way I
know is to create a new text file (that's the only option that makes a
file of zero size), then rename it, accepting the warning about changing
the extension. (Or create and edit it as a text file, then have to
fiddle with the name in the save function in Notepad or whatever editor.)
-- 
J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

"Everyone is entitled to an *informed* opinion." - Harlan Ellison

[toc] | [next] | [standalone]


#186292

FromPaul <nospam@needed.invalid>
Date2025-07-28 08:18 -0400
Message-ID<1067pr0$3gdcc$1@dont-email.me>
In reply to#186290
On Mon, 7/28/2025 7:39 AM, J. P. Gilliver wrote:
> Is there any way to add something of the sort to the "New ..." menu in
> File Manager?
> 
> I recently wanted to create a .css file, for example. The only way I
> know is to create a new text file (that's the only option that makes a
> file of zero size), then rename it, accepting the warning about changing
> the extension. (Or create and edit it as a text file, then have to
> fiddle with the name in the save function in Notepad or whatever editor.)
> 

There probably is a way to make a .css file from a menu.

In Notepad, setting the filetype to "All Files" and saving as "some.css"
seems to give a CSS file without a .txt glued to the end. It does not
look like the operation is that much of a trauma, to be done manually :-)

On the Macintosh, there was a utility called "FileTyper" which everyone
used, and that is the rough equivalent of changing the extension from
.txt to .css . It's a popular topic, this object oriented override wish
we have. On their utility, it still takes typing, to make the change.
Just in case you were thinking the utility was a mind reader and did
the right thing without asking.

But making a menu with the creation capability for 200 item types,
does that make sense ? That's what we have to ask. On Linux, there
is one wildcard file type and it is a "New.txt" kind of thing (users
edit the details), there is a folder creation item and so on. They
don't have 200 file types in their menu, and they also don't even
rely on the extension for identifying files. A CSS would be detected
by having "CSS constructs" or a "CSS magic number" near the top of the file.

On Linux, there are at least 100 different text file types which the
"file" utility recognizes. Including text file types I would claim
to you are "damaged goods", Linux identifies them as if they
exist intentionally. Like a text file, where the line termination
style changes... half way through the document. Linux has a detection
for that.

Summary: There will always be a need for the user to do some things manually.
         A utility for such a purpose, would still need a gigantic menu,
         or a hole to type the identifier of the file type, so it's pretty
         hard to avoid the manual labour. Even if an AI was involved, you
         would still have to say "make this a CSS for me", so there is still
         a selection step. If you didn't tell the AI exactly what to do, it
         would be just as likely to "find and delete your database for you" :-)
         AI have that special something, called "a lack of common sense".
         They're the helper, that always spills your drink, before getting
         to the table.

   Paul

[toc] | [prev] | [next] | [standalone]


#186305

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-28 16:46 +0100
Message-ID<106860c$265c3$1@dont-email.me>
In reply to#186292
On 2025/7/28 13:18:40, Paul wrote:
> On Mon, 7/28/2025 7:39 AM, J. P. Gilliver wrote:
>> Is there any way to add something of the sort to the "New ..." menu in
>> File Manager?
>>
>> I recently wanted to create a .css file, for example. The only way I
>> know is to create a new text file (that's the only option that makes a
>> file of zero size), then rename it, accepting the warning about changing
>> the extension. (Or create and edit it as a text file, then have to
>> fiddle with the name in the save function in Notepad or whatever editor.)
>>
> 
> There probably is a way to make a .css file from a menu.

Thanks, and to Philip, R., and Alan who told me how to add a new
filetypw by editing the registry.

I was just wondering, if there's any way to add - say - "new file", that
would let you specify any (or no!) extension when you typed in the name.

Thinking about it, that wouldn't save you _that_ much time, as you'd
still have to select which editor when you wanted to actually put
something _in_ it after creating it. (Though I have vague memory of some
way to specify an editor to be used for any [all] "unknown" types.)>
> In Notepad, setting the filetype to "All Files" and saving as "some.css"
> seems to give a CSS file without a .txt glued to the end. It does not
> look like the operation is that much of a trauma, to be done manually :-)

No, putting the filename "in quotes" is the way to override the default
extension in Notepad (and, I'm pretty sure, assorted other things too).

[]

> But making a menu with the creation capability for 200 item types,
> does that make sense ? That's what we have to ask. On Linux, there

That, indeed, is why I was after a generic.

[]

-- 
J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

At the age of 7, Julia Elizabeth Wells could sing notes only dogs could
hear.

[toc] | [prev] | [next] | [standalone]


#186315

From"R.Wieser" <address@is.invalid>
Date2025-07-28 18:51 +0200
Message-ID<10689ri$27uo2$1@dont-email.me>
In reply to#186305
J.P. ,

> I was just wondering, if there's any way to add - say - "new file", that
> would let you specify any (or no!) extension when you typed in the name.

On my machine that is what happens by default : if you forget the extension 
none is used.  When you use an extension than that one is used.   In both 
cases you get a warning though

> Thinking about it, that wouldn't save you _that_ much time, as you'd
> still have to select which editor when you wanted to actually put
> something _in_ it after creating it. (Though I have vague memory of
> some way to specify an editor to be used for any [all] "unknown" types.)

You can give the .css entry in the registry some stuff to mimic the .txt 
entry.  That way all you would need to do is to double-click the .css file 
to have it open in the standard text editor.

I my (XPsp3) case thats :
- - - - - - - - - - - - - -
HKEY_CLASSES_ROOT\.css\PersistentHandler
@={eec97550-47a9-11cf-b952-00aa0051fe20}
- - - - - - - - - - - - - -

if you want to be able to select your own editor to open it with it goes 
like this
- - - - - - - - - - - - - -
HKEY_CLASSES_ROOT\.css\Shell\Open\Command
@="C:\WINDOWS\system32\write.exe" "%1"
- - - - - - - - - - - - - -

Hope that helps.

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#186317

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-28 19:10 +0100
Message-ID<1068ef6$3it0n$1@dont-email.me>
In reply to#186315
On 2025/7/28 18:18:55, J. P. Gilliver wrote:
> (This reply is by email)

Sorry, Thunderbird decided the email failed, so sent it to a newsgroup -
but I think wrong one. (Without asking me, I think.)>
> On 2025/7/28 17:51:39, R.Wieser wrote:
>> J.P. ,
>>
>>> I was just wondering, if there's any way to add - say - "new file", that
>>> would let you specify any (or no!) extension when you typed in the name.
>>
>> On my machine that is what happens by default : if you forget the extension 
>> none is used.  When you use an extension than that one is used.   In both 
>> cases you get a warning though
> 
> I think we're talking about different things. I'm talking about
> right-clicking in a folder (in File Explorer), and selecting New: that
> offers Folder, Shortcut, and (in my case) ten filetypes, from Windows
> Batch File to Text Document. You can't "forget" the extension - when you
> select one of the options, it preloads the extension (e. g. if you
> select Text Document, it creates "New Text Document.txt", with the part
> before the dot highlighted for you to tye-replace. (IIRR, on 7 and
> earlier it created "Untitled.txt", again with the first part highlighted.)
> 
> []
> 
>> You can give the .css entry in the registry some stuff to mimic the .txt 
> 
> []
> 
> I wasn't trying to add a _specific_ new type (such as .css); I was
> wondering if there was any way to add a _generic_ "new file" to the list
> (of things it can create).
> 
-- 
J. P. Gilliver

[toc] | [prev] | [next] | [standalone]


#186320

From"R.Wieser" <address@is.invalid>
Date2025-07-28 22:18 +0200
Message-ID<1068m0f$3jpnd$1@dont-email.me>
In reply to#186317
J. P.  ,

>>> On my machine that is what happens by default : if you forget the
>>> extension none is used.  When you use an extension than that one
>>> is used.   In both cases you get a warning though
>>
>> I think we're talking about different things. I'm talking about
>> right-clicking in a folder (in File Explorer), and selecting New:

Don't worry, we are talking about the same thing.

>> You can't "forget" the extension - when you
>> select one of the options, it preloads the extension (e. g. if you
>> select Text Document, it creates "New Text Document.txt", with
>> the part before the dot highlighted for you to tye-replace.

Well, that is different from what happens on my XP machine - there the whole 
name (including the extension) is hi-lited.  Which sometimes leads to me 
start typing a new filename and by it loosing the suggested filename, and 
ofcourse the the extension too.

>> I wasn't trying to add a _specific_ new type (such as .css); I was
>> wondering if there was any way to add a _generic_ "new file" to the
>> list (of things it can create).

Hmmm... The last time I tried a similar thing it worked, but the OS was 
still looking for the suggested filename (so it could hi-lite it in the 
file-browser).  iow, it left something to be desired. :-\

The whole "trick" was to, in the registry, replace the "filename" value with 
the template-file name with a "command" value pointing to some kind of 
executable (in my case some VBScript) which took the suggested path & 
filename (provided to the executable/script as "%1"), stripped the filename, 
appended a new filename and created it.

Not the best solution, so I never used it.

To be honest, I never thought about creating a file without an extension, as 
it was, under XP, too easy to delete the extension.

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#186326

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-29 01:37 +0100
Message-ID<106953d$3it0o$4@dont-email.me>
In reply to#186320
On 2025/7/28 21:18:49, R.Wieser wrote:
> J. P.  ,
> 
>>>> On my machine that is what happens by default : if you forget the
>>>> extension none is used.  When you use an extension than that one
>>>> is used.   In both cases you get a warning though
>>>
>>> I think we're talking about different things. I'm talking about
>>> right-clicking in a folder (in File Explorer), and selecting New:
> 
> Don't worry, we are talking about the same thing.
> 
>>> You can't "forget" the extension - when you
>>> select one of the options, it preloads the extension (e. g. if you
>>> select Text Document, it creates "New Text Document.txt", with
>>> the part before the dot highlighted for you to tye-replace.
> 
> Well, that is different from what happens on my XP machine - there the whole 
> name (including the extension) is hi-lited.  Which sometimes leads to me 
> start typing a new filename and by it loosing the suggested filename, and 
> ofcourse the the extension too.

I'd forgotten that was how it used to work.>
>>> I wasn't trying to add a _specific_ new type (such as .css); I was
>>> wondering if there was any way to add a _generic_ "new file" to the
>>> list (of things it can create).

[]
> To be honest, I never thought about creating a file without an extension, as 
> it was, under XP, too easy to delete the extension.

[]
Yes, when you become aware that it is only too easy to do something by
mistake, you get sensitised to it and don't often do it!

I wasn't after a way to create an extensionless file - only to avoid
_predefined_ extensions, so I could make an arbitrary one without having
to accept the warning message.

The only time I've dealt with an extensionless file (apart from some
_really_ old ones - 1990s or earlier?, from before standard extensions
became a thing! - is the hosts file: see threads here passim.

-- 
J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

Alcohol is way ahead of cocaine as the world's deadliest drug, hastening
around three million people per year into their graves (cocaine and
heroin and crystal meth account for around half a million annually).
Revd Richard Coles, RT 2021/7/3-9

[toc] | [prev] | [next] | [standalone]


#186329

From"R.Wieser" <address@is.invalid>
Date2025-07-29 09:10 +0200
Message-ID<1069s6s$2gsrj$1@dont-email.me>
In reply to#186326
J. P. ,

>>>> I wasn't trying to add a _specific_ new type (such as .css); I was
>>>> wondering if there was any way to add a _generic_ "new file" to the
>>>> list (of things it can create).

In that case the "trick" with the "command" value should work.  In my case I 
would use some VBScript and add an inputbox to enter the new name in.

The downside that the new file doesn't get hi-lited still applies tho.

> The only time I've dealt with an extensionless file (apart from some
> _really_ old ones - 1990s or earlier?, from before standard extensions
> became a thing! - is the hosts file: see threads here passim.

Same here - although a quick check just now shows there are a number of them 
in the Windows folder-tree (none for the user though).

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#186342

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-29 18:46 +0100
Message-ID<106b1d0$2o3h6$1@dont-email.me>
In reply to#186329
On 2025/7/29 8:10:50, R.Wieser wrote:
> J. P. ,

[]

>> The only time I've dealt with an extensionless file (apart from some
>> _really_ old ones - 1990s or earlier?, from before standard extensions
>> became a thing! - is the hosts file: see threads here passim.
> 
> Same here - although a quick check just now shows there are a number of them 
> in the Windows folder-tree (none for the user though).
> 
> Regards,
> Rudy Wieser
> 
> 

Just out of curiosity - how did you find that out? Looking for no
extensions sounds challenging!

	dir /s *.

maybe?
-- 
J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

Alcohol is way ahead of cocaine as the world's deadliest drug, hastening
around three million people per year into their graves (cocaine and
heroin and crystal meth account for around half a million annually).
Revd Richard Coles, RT 2021/7/3-9

[toc] | [prev] | [next] | [standalone]


#186343

Fromknuttle <keith_nuttle@yahoo.com>
Date2025-07-29 13:58 -0400
Message-ID<106b24b$2p9mv$1@dont-email.me>
In reply to#186342
On 07/29/2025 1:46 PM, J. P. Gilliver wrote:
> On 2025/7/29 8:10:50, R.Wieser wrote:
>> J. P. ,
> 
> []
> 
>>> The only time I've dealt with an extensionless file (apart from some
>>> _really_ old ones - 1990s or earlier?, from before standard extensions
>>> became a thing! - is the hosts file: see threads here passim.
>>
>> Same here - although a quick check just now shows there are a number of them
>> in the Windows folder-tree (none for the user though).
>>
>> Regards,
>> Rudy Wieser
>>
>>
> 
> Just out of curiosity - how did you find that out? Looking for no
> extensions sounds challenging!
> 
> 	dir /s *.
> 
> maybe?
If you use Thunderbird, it has always used an extensionless file for the 
bodies of the emails in a folder and a file of the same name with an 
extentions to keep track of the individual messages. ie Folder in the 
current version named 5K RUN = two folders, 5K RUN. / 5K RUN.msf.

[toc] | [prev] | [next] | [standalone]


#186344

From"R.Wieser" <address@is.invalid>
Date2025-07-29 20:21 +0200
Message-ID<106b3go$2prsc$1@dont-email.me>
In reply to#186342
J.P. ,

>> Same here - although a quick check just now shows there are a number
>> of them in the Windows folder-tree (none for the user though).
>
> Just out of curiosity - how did you find that out? Looking for no
> extensions sounds challenging!
>
> dir /s *.
>
> maybe?

Pretty-much, yes.  :-)

dir /s /b /a-d *.

The "/b" to get whole filepaths, the "/a-d" to get rid of the 
subdirectories.

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#186345

Fromknuttle <keith_nuttle@yahoo.com>
Date2025-07-29 15:20 -0400
Message-ID<106b6un$2qsk8$1@dont-email.me>
In reply to#186344
On 07/29/2025 2:21 PM, R.Wieser wrote:
> J.P. ,
> 
>>> Same here - although a quick check just now shows there are a number
>>> of them in the Windows folder-tree (none for the user though).
>>
>> Just out of curiosity - how did you find that out? Looking for no
>> extensions sounds challenging!
>>
>> dir /s *.
>>
>> maybe?
> 
> Pretty-much, yes.  :-)
> 
> dir /s /b /a-d *.
> 
> The "/b" to get whole filepaths, the "/a-d" to get rid of the
> subdirectories.
> 
> Regards,
> Rudy Wieser
> 
> 
It is amazing what you can do with the old Dos Batch file commands. 
Some years ago I worked for a company where IT tied all computer up so 
they would be secure.  You could basically run approved programs and 
type from the keyboard.   EXCEPT they forgot about the BATCH commands. 
I used them to create a database of some files on their system, saved me 
a lot of typing.

[toc] | [prev] | [next] | [standalone]


#186346

From"R.Wieser" <address@is.invalid>
Date2025-07-29 21:47 +0200
Message-ID<106b8gk$2rau6$1@dont-email.me>
In reply to#186345
Knuttle,

> It is amazing what you can do with the old Dos Batch file commands.

Command line commands actually.  But yes, they also worked in batch files. 
:-)

> Some years ago I worked for a company where IT tied all computer up so 
> they would be secure.  You could basically run approved programs and type 
> from the keyboard.   EXCEPT they forgot about the BATCH commands.

Don't blame them (to harshely).  Even MS has dropped the ball in that : I've 
still got the instructions with which to bypass W98 login procedure - and 
its surprisingly easy (using their OS against them).

> I used them to create a database of some files on their system, saved me a 
> lot of typing.

That makes me remember this story :

https://thedailywtf.com/articles/Classic-WTF-The-Indexer

:-)

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#186350

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-29 22:38 +0100
Message-ID<106bf0s$2o3h6$3@dont-email.me>
In reply to#186346
On 2025/7/29 20:47:3, R.Wieser wrote:
> Knuttle,
> 
>> It is amazing what you can do with the old Dos Batch file commands.
> 
> Command line commands actually.  But yes, they also worked in batch files. 
> :-)

Yes, I admired that knowledge of dir's switches!

[]

> https://thedailywtf.com/articles/Classic-WTF-The-Indexer

[]

I found that depressingly believable.
-- 
J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

This was before we knew that a laboratory rat, if experimented upon,
will develop cancer. 	[Quoted by] Anne (annezo@aol.com), 1997-1-29

[toc] | [prev] | [next] | [standalone]


#186367

From"R.Wieser" <address@is.invalid>
Date2025-07-30 08:57 +0200
Message-ID<106cj46$33k2s$1@dont-email.me>
In reply to#186350
J.P. ,

>> Command line commands actually.  But yes, they also worked in batch
>> files.  :-)
>
> Yes, I admired that knowledge of dir's switches!

:-)  I just had to remember *one* thing : if I had no clue (or forgotten) 
what a command does than I just needed to type its name and than "/?" 
(without the double-quotes).  Most of the time it than showed a "help" page 
with all its arguments switches.

Under XP it even works for the command-shell itself : "command /?" or "cmd 
/?".

>
>> https://thedailywtf.com/articles/Classic-WTF-The-Indexer
>
> I found that depressingly believable.

Indeed.  Which is why I saved the story on my 'puter (could not chance it to 
disappear).

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#186362

FromPaul <nospam@needed.invalid>
Date2025-07-29 22:02 -0400
Message-ID<106buf8$2vhai$1@dont-email.me>
In reply to#186346
On Tue, 7/29/2025 3:47 PM, R.Wieser wrote:
> Knuttle,
> 
>> It is amazing what you can do with the old Dos Batch file commands.
> 
> Command line commands actually.  But yes, they also worked in batch files. 
> :-)
> 
>> Some years ago I worked for a company where IT tied all computer up so 
>> they would be secure.  You could basically run approved programs and type 
>> from the keyboard.   EXCEPT they forgot about the BATCH commands.
> 
> Don't blame them (to harshely).  Even MS has dropped the ball in that : I've 
> still got the instructions with which to bypass W98 login procedure - and 
> its surprisingly easy (using their OS against them).
> 
>> I used them to create a database of some files on their system, saved me a 
>> lot of typing.
> 
> That makes me remember this story :
> 
> https://thedailywtf.com/articles/Classic-WTF-The-Indexer
> 
> :-)
> 
> Regards,
> Rudy Wieser
> 
> 

One thing about "dir", is it is hella-fast as code goes.
Other ways of enumerating a file tree, don't go that fast.

The "dir" thing can read the $MFT at an equivalent speed
of 2GB/sec. Which is pretty well the top speed of any userspace
stuff on the machine here. It's possible irfanview runs
that fast, when loading an image (I have the odd test image
that is 10GB in size). My storage won't go much faster than that,
depending on activities on the machine at the time.

   Paul

[toc] | [prev] | [next] | [standalone]


#186369

From"R.Wieser" <address@is.invalid>
Date2025-07-30 09:54 +0200
Message-ID<106cj49$33k2s$3@dont-email.me>
In reply to#186362
Paul,

> One thing about "dir", is it is hella-fast as code goes.
> Other ways of enumerating a file tree, don't go that fast.

I have no idea which internal tricks the "dir" command uses to become that 
fast*, but do remember that the commandline "dir" doesn't sort.  It just 
shows the files in order of how they appear in the filesystem.  Most Windows 
oriented "dir" methods will sort on the filename.

* it could just iterate over the records in a retrieved raw cluster, 
bypassing the API the rest of us have to use.

Also, I've written directory traversal code for both DOS as well as Windows, 
and if I did not output anything it was always quite fast.  iow, the 
bottleneck was more often than not the storing of the retrieved data 
somewhere (screen, list/treeview, file).

Regards,
Rudy Wieser

[toc] | [prev] | [next] | [standalone]


#186371

FromPhilip Herlihy <nothing@invalid.com>
Date2025-07-30 14:24 +0100
Message-ID<MPG.42f42d579e6897339896b5@news.eternal-september.org>
In reply to#186346
In article <106b8gk$2rau6$1@dont-email.me>, address@is.invalid says...
>
>Knuttle,
>
>> It is amazing what you can do with the old Dos Batch file commands.
>
...
>That makes me remember this story :
>
>https://thedailywtf.com/articles/Classic-WTF-The-Indexer
>

You could do even more with Unix shell-scripting - presumably still 
availablein Linux, and something similar's available with PowerShell 
(never learned either as it happens).

Years ago (mid- 90s) the head of my department called me into his 
office.  Had a project for me, likely to last 6m or so.  He described it 
- a way of grooming a live feed so that stats could be displayed on one 
of these new-fangled "web pages".  Realisation dawned as he spoke.  I 
asked if I could come back to him in an hour's time.  He was puzzled, 
but agreed.

An hour later I explained that I'd assembled a series of shell-script 
fragments that I'd been gradually accumulating over the last year into a 
utility that would do exactly what he wanted, crucially using the 
relational "JOIN" script command.  It would need a little tidying up in 
terms of the exact display, but it was working.  Right now, at my desk 
upstairs.

He just didn't get it.  He said he would "drop by" and take a look, but 
he never did.  And a week later, one of my colleagues was given the same 
project.  He was still trying to write C++ code six months later.  Yet 
within an hour of being asked, I'd had a working prototype running on my 
screen.  Didn't do me any good, actually.  That was meant to be a plum 
project, and I was overlooked after that.  (I left.)

In another role, I'd come in one morning to find my then boss sizzling 
over his keyboard.  He'd been given a large (!) file of data including a 
"code" for a location in a vast network.  Unfortunately the other data 
that was to be used had the code formatted very slightly differently - 
the human eye could make the translation trivially, but matching it 
electronically was impossible, it seemed.  He'd come in just after dawn 
and had been working in a text editor manually changing the codes for 
two hours by the time I arrived.  The progress indicator still showed 
0%.

"Would you like me to do that for you?" I asked.  He practically kicked 
his chair down the hall.  I got him to explain the exact naming 
convention, and spent ten minutes studying both files of data, and 
writing a shell "pipeline" using "SED", the only utility capable both of 
"regular expressions" and handling a file of arbitrary size.  I closed 
his edit session (cheekily telling it not to bother saving changes) and 
ran my script.  It ran for ten minutes, and fixed every single code.

Then there was the project based on an object-oriented database (which 
didn't seem to work after a month's hard work on it) which I replaced 
with a shell-script I'd written in two hours for a customer demo which 
had been sprung on me at 24 hours' notice.  My then boss subsequently 
went off into rhetorical flights about how this COULD NOT HAVE BEEN 
ACHIEVED in just one month without using "advanced programming 
techniques" like the latest object-oriented database.  I only told him 
afterwards.

DOS scripting never had the power or fluency of Unix shell-scripting, 
but although I find the "look" of PowerShell rather off-putting I think 
it very likely that PS could do all this - it's just a shame I've never 
had any reason to learn it.  But if you're a Linux user, check to see if 
SED and AWK and JOIN (etc) are still available.  If so, you're sitting 
on some real data processing power there.

--
Phil, London

[toc] | [prev] | [next] | [standalone]


#186372

FromPaul <nospam@needed.invalid>
Date2025-07-30 09:55 -0400
Message-ID<106d88e$384vf$1@dont-email.me>
In reply to#186371
On Wed, 7/30/2025 9:24 AM, Philip Herlihy wrote:
> In article <106b8gk$2rau6$1@dont-email.me>, address@is.invalid says...
>>
>> Knuttle,
>>
>>> It is amazing what you can do with the old Dos Batch file commands.
>>
> ...
>> That makes me remember this story :
>>
>> https://thedailywtf.com/articles/Classic-WTF-The-Indexer
>>
> 
> You could do even more with Unix shell-scripting - presumably still 
> availablein Linux, and something similar's available with PowerShell 
> (never learned either as it happens).
> 
> Years ago (mid- 90s) the head of my department called me into his 
> office.  Had a project for me, likely to last 6m or so.  He described it 
> - a way of grooming a live feed so that stats could be displayed on one 
> of these new-fangled "web pages".  Realisation dawned as he spoke.  I 
> asked if I could come back to him in an hour's time.  He was puzzled, 
> but agreed.
> 
> An hour later I explained that I'd assembled a series of shell-script 
> fragments that I'd been gradually accumulating over the last year into a 
> utility that would do exactly what he wanted, crucially using the 
> relational "JOIN" script command.  It would need a little tidying up in 
> terms of the exact display, but it was working.  Right now, at my desk 
> upstairs.
> 
> He just didn't get it.  He said he would "drop by" and take a look, but 
> he never did.  And a week later, one of my colleagues was given the same 
> project.  He was still trying to write C++ code six months later.  Yet 
> within an hour of being asked, I'd had a working prototype running on my 
> screen.  Didn't do me any good, actually.  That was meant to be a plum 
> project, and I was overlooked after that.  (I left.)
> 
> In another role, I'd come in one morning to find my then boss sizzling 
> over his keyboard.  He'd been given a large (!) file of data including a 
> "code" for a location in a vast network.  Unfortunately the other data 
> that was to be used had the code formatted very slightly differently - 
> the human eye could make the translation trivially, but matching it 
> electronically was impossible, it seemed.  He'd come in just after dawn 
> and had been working in a text editor manually changing the codes for 
> two hours by the time I arrived.  The progress indicator still showed 
> 0%.
> 
> "Would you like me to do that for you?" I asked.  He practically kicked 
> his chair down the hall.  I got him to explain the exact naming 
> convention, and spent ten minutes studying both files of data, and 
> writing a shell "pipeline" using "SED", the only utility capable both of 
> "regular expressions" and handling a file of arbitrary size.  I closed 
> his edit session (cheekily telling it not to bother saving changes) and 
> ran my script.  It ran for ten minutes, and fixed every single code.
> 
> Then there was the project based on an object-oriented database (which 
> didn't seem to work after a month's hard work on it) which I replaced 
> with a shell-script I'd written in two hours for a customer demo which 
> had been sprung on me at 24 hours' notice.  My then boss subsequently 
> went off into rhetorical flights about how this COULD NOT HAVE BEEN 
> ACHIEVED in just one month without using "advanced programming 
> techniques" like the latest object-oriented database.  I only told him 
> afterwards.
> 
> DOS scripting never had the power or fluency of Unix shell-scripting, 
> but although I find the "look" of PowerShell rather off-putting I think 
> it very likely that PS could do all this - it's just a shame I've never 
> had any reason to learn it.  But if you're a Linux user, check to see if 
> SED and AWK and JOIN (etc) are still available.  If so, you're sitting 
> on some real data processing power there.
> 
> --
> Phil, London
> 

AWK is what I use for text processing. I have the AWK book, from the inventors
of the language, printed in 1988. But the book is not necessary, because
of the PDF manual that comes with GAWK (which came later in time). You can
make system calls from there, which gives you some elements of scripting,
with perhaps a bit easier syntax.

This one has Windows line endings, and is version 3.1.6 .

   https://gnuwin32.sourceforge.net/packages/gawk.htm

If I switch to Bash shell, the Linux there has Gawk 4, but you
need a two line stanza to fix the line endings (because it has
Linux line endings). On only one occasion, I had the windows 3.1.6
version crash, while processing a 10GB text file. I took it over
to the Gawk 4 one, and the script ran without a problem.

The doc link would get you the PDF file (after you unpack
the ZIP that the site delivers).

   https://gnuwin32.sourceforge.net/downlinks/gawk-doc-zip.php

SED is more powerful, in that you can handle some pretty nasty
messes in files with it. But then the syntax is also a handful.

AWK has the limitation it's not a UTF-8 thing, it works with
ANSI text most directly. You have to be more careful on
modern Windows, with your Notepad and the saving modes,
to not make disaster-materials for your AWK run.

   Paul

[toc] | [prev] | [next] | [standalone]


#186377

Fromknuttle <keith_nuttle@yahoo.com>
Date2025-07-30 13:44 -0400
Message-ID<106dllq$3b7o1$1@dont-email.me>
In reply to#186371
On 07/30/2025 9:24 AM, Philip Herlihy wrote:
> In article <106b8gk$2rau6$1@dont-email.me>, address@is.invalid says...
>>
>> Knuttle,
>>
>>> It is amazing what you can do with the old Dos Batch file commands.
>>
> ...
>> That makes me remember this story :
>>
>> https://thedailywtf.com/articles/Classic-WTF-The-Indexer
>>
> 
> You could do even more with Unix shell-scripting - presumably still
> availablein Linux, and something similar's available with PowerShell
> (never learned either as it happens).
> 
> Years ago (mid- 90s) the head of my department called me into his
> office.  Had a project for me, likely to last 6m or so.  He described it
> - a way of grooming a live feed so that stats could be displayed on one
> of these new-fangled "web pages".  Realisation dawned as he spoke.  I
> asked if I could come back to him in an hour's time.  He was puzzled,
> but agreed.
> 
> An hour later I explained that I'd assembled a series of shell-script
> fragments that I'd been gradually accumulating over the last year into a
> utility that would do exactly what he wanted, crucially using the
> relational "JOIN" script command.  It would need a little tidying up in
> terms of the exact display, but it was working.  Right now, at my desk
> upstairs.
> 
> He just didn't get it.  He said he would "drop by" and take a look, but
> he never did.  And a week later, one of my colleagues was given the same
> project.  He was still trying to write C++ code six months later.  Yet
> within an hour of being asked, I'd had a working prototype running on my
> screen.  Didn't do me any good, actually.  That was meant to be a plum
> project, and I was overlooked after that.  (I left.)
> 
> In another role, I'd come in one morning to find my then boss sizzling
> over his keyboard.  He'd been given a large (!) file of data including a
> "code" for a location in a vast network.  Unfortunately the other data
> that was to be used had the code formatted very slightly differently -
> the human eye could make the translation trivially, but matching it
> electronically was impossible, it seemed.  He'd come in just after dawn
> and had been working in a text editor manually changing the codes for
> two hours by the time I arrived.  The progress indicator still showed
> 0%.
> 
> "Would you like me to do that for you?" I asked.  He practically kicked
> his chair down the hall.  I got him to explain the exact naming
> convention, and spent ten minutes studying both files of data, and
> writing a shell "pipeline" using "SED", the only utility capable both of
> "regular expressions" and handling a file of arbitrary size.  I closed
> his edit session (cheekily telling it not to bother saving changes) and
> ran my script.  It ran for ten minutes, and fixed every single code.
> 
> Then there was the project based on an object-oriented database (which
> didn't seem to work after a month's hard work on it) which I replaced
> with a shell-script I'd written in two hours for a customer demo which
> had been sprung on me at 24 hours' notice.  My then boss subsequently
> went off into rhetorical flights about how this COULD NOT HAVE BEEN
> ACHIEVED in just one month without using "advanced programming
> techniques" like the latest object-oriented database.  I only told him
> afterwards.
> 
> DOS scripting never had the power or fluency of Unix shell-scripting,
> but although I find the "look" of PowerShell rather off-putting I think
> it very likely that PS could do all this - it's just a shame I've never
> had any reason to learn it.  But if you're a Linux user, check to see if
> SED and AWK and JOIN (etc) are still available.  If so, you're sitting
> on some real data processing power there.
> 
> --
> Phil, London
I could be wrong but as I remember Powershell was just a CMD that was 
giving administrative privileges.  In the current Windows 11 they are 
called Terminal and Terminal (admin).  both accept the old DOS commands 
just differing in what they can access.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | alt.comp.os.windows-10


csiph-web