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


Groups > comp.internet.services.video.youtube > #369 > unrolled thread

Re: Creating new files of indeterminate sort?

Started by"J. P. Gilliver" <G6JPG@255soft.uk>
First post2025-07-28 18:18 +0100
Last post2025-07-30 23:37 -0400
Articles 20 on this page of 27 — 6 participants

Back to article view | Back to comp.internet.services.video.youtube

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 18:18 +0100
    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

Page 1 of 2  [1] 2  Next page →


#369 — Re: Creating new files of indeterminate sort?

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-28 18:18 +0100
SubjectRe: Creating new files of indeterminate sort?
Message-ID<42eaa64a-882a-487e-a88f-44d597714dea@255soft.uk>
(This reply is by email)

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. 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] | [next] | [standalone]


#370

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-28 19:10 +0100
Message-ID<1068ef6$3it0n$1@dont-email.me>
In reply to#369
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]


#371

From"R.Wieser" <address@is.invalid>
Date2025-07-28 22:18 +0200
Message-ID<1068m0f$3jpnd$1@dont-email.me>
In reply to#370
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]


#372

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-29 01:37 +0100
Message-ID<106953d$3it0o$4@dont-email.me>
In reply to#371
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]


#373

From"R.Wieser" <address@is.invalid>
Date2025-07-29 09:10 +0200
Message-ID<1069s6s$2gsrj$1@dont-email.me>
In reply to#372
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]


#376

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-29 18:46 +0100
Message-ID<106b1d0$2o3h6$1@dont-email.me>
In reply to#373
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]


#377

Fromknuttle <keith_nuttle@yahoo.com>
Date2025-07-29 13:58 -0400
Message-ID<106b24b$2p9mv$1@dont-email.me>
In reply to#376
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]


#378

From"R.Wieser" <address@is.invalid>
Date2025-07-29 20:21 +0200
Message-ID<106b3go$2prsc$1@dont-email.me>
In reply to#376
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]


#379

Fromknuttle <keith_nuttle@yahoo.com>
Date2025-07-29 15:20 -0400
Message-ID<106b6un$2qsk8$1@dont-email.me>
In reply to#378
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]


#380

From"R.Wieser" <address@is.invalid>
Date2025-07-29 21:47 +0200
Message-ID<106b8gk$2rau6$1@dont-email.me>
In reply to#379
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]


#381

From"J. P. Gilliver" <G6JPG@255soft.uk>
Date2025-07-29 22:38 +0100
Message-ID<106bf0s$2o3h6$3@dont-email.me>
In reply to#380
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]


#384

From"R.Wieser" <address@is.invalid>
Date2025-07-30 08:57 +0200
Message-ID<106cj46$33k2s$1@dont-email.me>
In reply to#381
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]


#383

FromPaul <nospam@needed.invalid>
Date2025-07-29 22:02 -0400
Message-ID<106buf8$2vhai$1@dont-email.me>
In reply to#380
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]


#386

From"R.Wieser" <address@is.invalid>
Date2025-07-30 09:54 +0200
Message-ID<106cj49$33k2s$3@dont-email.me>
In reply to#383
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]


#387

FromPhilip Herlihy <nothing@invalid.com>
Date2025-07-30 14:24 +0100
Message-ID<MPG.42f42d579e6897339896b5@news.eternal-september.org>
In reply to#380
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]


#388

FromPaul <nospam@needed.invalid>
Date2025-07-30 09:55 -0400
Message-ID<106d88e$384vf$1@dont-email.me>
In reply to#387
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]


#391

Fromknuttle <keith_nuttle@yahoo.com>
Date2025-07-30 13:44 -0400
Message-ID<106dllq$3b7o1$1@dont-email.me>
In reply to#387
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]


#394

FromPaul <nospam@needed.invalid>
Date2025-07-30 23:33 -0400
Message-ID<106eo60$3i64t$1@dont-email.me>
In reply to#391
On Wed, 7/30/2025 1:44 PM, knuttle wrote:

> 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.

   MSDOS - Close to the hardware,  Little protection for the hardware,
           "original" shell commands. I don't think there is a Ring0 and a Ring3
           for this environment. Some of the commands use raw addresses.
           (Raw *physical* addresses, not the virtual ones used elsewhere.)

   Command Prompt - Relies on a separate OS. Uses NTVDM for runtime.
                    MSDOS commands are "emulated", rather than being
                    direct to hardware. You will be frequently told "this
                    program only works properly in MSDOS", to remind you
                    that Command Prompt is not DOSBOX. It's a facade.

   PowerShell - The same degree of isolation as the Command Prompt, but
                with a "new" programming language and schema. It resorts to
                gobs or red text on error. If you run an applet and provide too
                few operands, Powershell will ask you for values for the missing
                ones (annoying!). Command Prompt does not do that. PowerShell
                has tab completion like tcsh. Type something in Powershell,
                poke the tab key multiple times and see as it offers suggestions.

In Linux or Unix, you might have several shells. We don't insult them by claiming
one is executing exactly the same commands as the others. They're quite different
at the detail level.

   /bin/sh     Bourne shell                   https://en.wikipedia.org/wiki/Bourne_shell
   /bin/csh    C Shell                        https://en.wikipedia.org/wiki/C_shell
   /bin/tcsh   C shell with Tab Completion    https://en.wikipedia.org/wiki/Tcsh

While the Windows shells can have *some* similarities

    dir    # cmd.exe
    dir    # powershell.exe

the support for dir on powershell, is similar to its half assed support for ls.

    dir /ah  # cmd.exe  (works)
    dir /ah  # powershell.exe (Uh oh, doesn't work, now we are learning something...)

The dir on Powershell, is an instance of "Get-ChildItem" and it does not
accept the same arguments. So rather than being a custom written "dir",
it is an alias of some kind for "Get-ChildItem". This is a compensation for
the muscle-memory of the user community, who would be typing "dir" and
expecting output like they were typing "ls" on some other systems. But it is
not really dir, it's just a tasty label affixed to "a distant approximation"
to the command.

If I type "ls" in Powershell, it works just as well as typing "dir".
it uses the self-same "Get-ChildItem". If you slap too many arguments
after the "ls" letters (which stand for listdir), the command fails
and you get red colored text.

    ls     # This never worked in cmd.exe so we expect an error. It's like testing water is wet.
    ls     # Works as well as "dir" does in Powershell. Would not accept -algtR

So like the Bourne shell example, shells evolve, different people take
a shot at writing them. The language may be procedural, but it can
have some differences. The syntax for a for loop could be quite
different. Powershell has "filter behavior" when piping output from
one applet to another applet (a power user feature, converts gobs of text
into specific terse words).

I don't know enough Powershell to fill a thimble :-) But, I use my experience
to note it's an evolution, someone took a stab at designing a language for
it. And they deposited a few "aliases" in it, to fool you into
thinking that was a real "dir" they offered :-) Well, I was fooled too,
until I did this and it failed. This was a little splash of cold water.

   dir /ah    # Powershell. Oops. No hidden items for you!

   dir /?     # Help option in Command Prompt
   dir -?     # May offer help in Powershell (you *really* should try this one, what an eyeful!)
              # I only learned this a few days ago, and me typing it out helps reinforce it :-)

They've made other kinds of "fool you" stuff. Like maybe "wget" is
an alias for some network thing they wrote.

*******

One of the better teaching aids, is when someone makes a "programming card"
with columns for each shell, and what command would be required as an
equivalent for each shell. For Unix, our programming card had five shells
on it, so there were five columns with the commands, and some points in
the table were "missing", when one of the shells had no command to do
a certain thing. For the most part, this wasn't really necessary
for Windows, but maybe a programmer card eventually would be a good idea.

   Paul

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


#374

From"R.Wieser" <address@is.invalid>
Date2025-07-29 10:03 +0200
Message-ID<1069v99$2hejd$1@dont-email.me>
In reply to#372
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).

I could not drop the issue, and googled for how it could/would work on XP. 
The first result was this one :

https://superuser.com/questions/1632295/creating-a-file-with-no-extension-with-right-click-on-windows-10

:-)

The whole "trick" seems to be to press ctrl-A to select the whole filename.

Regards,
Rudy Wieser

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


#375

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

Another possibility (likely doesn't pop up the "changing extension" 
confirmation dialog) :

https://stackoverflow.com/questions/77233980/how-to-creating-a-new-file-context-menu-for-blank-no-extension-file-or-your-ow

Notice the "NoExtension" entry.

Regards,
Rudy Wieser 

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


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.internet.services.video.youtube


csiph-web