 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Just as an example, I
> have never seen a soft link used in Windows, or seen the need for a soft
> link other than to fix broken programs that hard-coded file names that they
> were supposed to be pulling out of the environment. People don't use soft
> links to point to the right location - they use configuration variables.
Well, duh. People don't use soft links because Windows doesn't support
them. Seems plainly obvious.
I'm pretty sure you wouldn't be writing that if Windows had full support
for soft links from day one to this day.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 21-4-2010 22:39, Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> Nope. Every window has a search box in it, *and* that search box handles the
>> complex file formats too. If all you want to do is search for a text string
>> in a directory tree, Windows has that.
>
> Do you honestly think I would be claiming that it doesn't work if I hadn't
> tried it already? It doesn't work.
>
> I really got once stuck because I just *couldn't* find what I was
> searching for. I knew the string was in some files and I wanted to know
> which of them, but the damn thing simply refused to tell me, no matter
> what I tried. (IIRC I was searching for C++ files which include a specific
> header or something like that. I ended up having to figure that out by
> other means.)
Seems like you have the same problem as me.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nekar Xenos <nek### [at] gmail com> wrote:
> I'm a total n00b as I can't seem to install anything without the Package
> Manager...
That's what package managers are for. If the software you want is in a
repository, then you *should* use your distro's package manager to install
it. It makes everything easier and smoother.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
>> Part of the problem comes from programs that don't support soft links
>> getting caught in loops.
>
> Soft links are and should be invisible to programs (unless the program
> explicitly wants to distinguish them, as a file explorer would).
Exactly my point. Write a program in Linux that walks a directory tree and
does *not* account for soft links (or "..") and you have a problem.
>> Why the heck would
>
> Did you mispaste that?
I think a meeting popped up.
> I don't want to see it in a separate dialog. I want to see it in the file
> listing.
http://www.codeproject.com/KB/shell/shellextguideindex.aspx
More specifically,
http://www.codeproject.com/kb/shell/ShellExtGuide8.aspx
>> And which byte count do you want?
>
> The size of the file. How many bytes it contains. If I opened it with a
> program and started reading bytes, how many I would get before EOF.
Open it raw, or processed, or for backup? There's *lots* of file opens in
Windows. They give you different byte counts. Do you want the number of
bytes you'd get by reading the compressed file and uncompressing it on the
fly, or the number of bytes you'd need to copy the file to another disk, or
the number of bytes you'd need to store the file in a way that can be
reconstructed (i.e., with ACLs and such). And if you have multiple streams,
do you want the bytes from those streams as well?
Really, files in Windows aren't just "how many bytes." It's really,
actually more complicated than that.
> Windows Explorer already shows that size in the file listing... but not
> in bytes (unless the file happens to be smaller than 1 kB or such). That's
> what's annoying about it.
On the rare occasion I wanted exact byte counts, I used Properties. I find
it more annoying that Linux doesn't put thousands-separators in numbers, so
when it shows me the size of a 20G file, it takes me lots of staring to
figure it out. :-)
>> So write an extension, if it bothers you.
>
> You make it sound like it's easy.
Then take the sample above and change it to show the column you want. It
isn't that hard. Heck, just read thru the text listed on that page and see
if there's anything that's unclear. (Of course there is, but not obviously
so. Not so unclear that you'd have a hard time clarifying it. :-)
I'll grant you that I don't know of a trivial scripting solution, but I
expect putting one of those together would be fun.
> Seeing the exact size of a file is a pretty common and useful thing to
> want.
For programmers, yes. Not for regular users. And you can see it with one
extra step. :-)
> Except that it doesn't tell that. If you try to copy it to another file
> system or an archive file, it will most probably end up taking a completely
> different amount of space.
Hence the "which size do you want" question. :-) That's another good point:
if it's an archive, do you want the size of the archive, the size of the
total files in the archive, etc? :-)
> Showing how much disk space a file takes is *useless* information. *That*
> is what should be in some info dialog. The file listing should show the
> exact byte size. Apple has done it completely in reverse of what it should be.
I think showing it as a readable size ("1.7 meg") is reasonable. Showing it
as "size in bytes" and "size on disk" are fine too.
> Yeah, start doing that to a dozen files, rather than seeing it in one
> glance in the file listing. It *is* extremely inconvenient.
If I want the total, I pick a dozen files and say "properties" and it tells
me the total. If I want to compare some in one window with some in another,
it's mildly more tedious. I might even have to open a shell script or
something. But even as a nerd, I don't do that too often. Mostly after doing
a download, to make sure I got all the bytes.
>> You're bitching that a nerd feature is convenient in Linux and not Windows?
>> You're a nerd. Exact file sizes are important to programmers, not users.
>
> And that's why they just *can't* include an option somewhere to turn on
> showing exact byte sizes? "Hey, it's a nerd option, we must not include
> such a thing! Heaven forbid if we start appealing to the nerd users!"
> I ask once again: What exactly would be the *problem* here?
No, they *can* make that possible. You're not their target audience
(namely, a nerd who doesn't program Windows). Hence, they haven't
implemented it. They spent their time on other things.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Do you honestly think I would be claiming that it doesn't work if I hadn't
> tried it already? It doesn't work.
You talked about XP. I'm talking about Vista, where it works far better. I
used Agent Ransack all the time on XP. Now I just use Vista search, unless
I'm specifically searching somewhere non-indexed (like inside the System32
directory) or I'm looking for a regex.
>> If all you want to do is search for a
>> regular expression in a directory tree, it's trivial to add that to Windows
>> either with a GUI or without.
>
> You have a really odd definition of "trivial".
>
> My definition of "trivial" is if it would be something like "write 'xyz'
> here, and it will work".
>
> Apparently your definition of "trivial" is "not impossible".
My definition of trivial is "download this .exe and put it in your search
path." Try google for "win32 grep" and you get several hits, one of which is
a direct GNU port.
>> If you want to know how to do searches that
>> are difficult in Linux, then it's going to be complex in Windows too.
>
> "grep 'xyz.hh' *" isn't very difficult in Linux. It seems to be in Windows
> (at least when using Windows Explorer).
XP, or Vista? As I said, it's broken in XP. I know that. That's why I'm
pointing you to win32 grep and at Agent Ransack. I'm offering you my
experience as a programmer on Windows having met and overcome the same
frustrations. If you really just want to bitch that there are some things
easy in Linux that are hard in Windows, then fine.
>> I'm
>> not going to teach you how to do that any more than you're going to explain
>> how to write the same searches using Linux tools.
>
> Do you know why? Because it's *not* trivial in Windows.
The thing I refused to explain (such as finding text in document comments
but not document content) isn't trivial in Linux, either.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> Just as an example, I
>> have never seen a soft link used in Windows, or seen the need for a soft
>> link other than to fix broken programs that hard-coded file names that they
>> were supposed to be pulling out of the environment. People don't use soft
>> links to point to the right location - they use configuration variables.
>
> Well, duh. People don't use soft links because Windows doesn't support
> them. Seems plainly obvious.
It has some support. People don't use them because they don't need them,
really. Software is written to not hard-code paths that don't need to be
hard-coded. *Some* people nevertheless hard-code paths, so you wind up with
soft links from "Documents and Settings" to "Users" or just leaving 64-bit
code under System32.
> I'm pretty sure you wouldn't be writing that if Windows had full support
> for soft links from day one to this day.
Uh, yes, actually, I would. I think soft links are an abomination, and I've
only ever seen them used to basically correct flaws in software
configurations. If I had something like a registry in Linux, I'd probably
never use a soft link. As it is, I tend to have one soft link per project
that sits in the root and points to the base of the tree of project code and
configuration. I'm all for fixing problems right, myself.
It's not like UNIX had them from day one either.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Uh, yes, actually, I would. I
BTW, you'll notice that nowhere did I saw Windows is better. I simply said
there's different target audience, and a different way of doing things, so
complaining that it doesn't come with all those tools you regularly use is
not an especially useful criticism.
I'm sure the stock brokers also bitch that the Windows calculator can do
square roots and hex, but it doesn't do cost of future value calculations or
compound interest calculations.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"andrel" <byt### [at] gmail com> a écrit dans le message de groupe de
discussion : 4BC### [at] gmail com...
> On 21-4-2010 22:39, Warp wrote:
>> I really got once stuck because I just *couldn't* find what I was
>> searching for. I knew the string was in some files and I wanted to know
>> which of them, but the damn thing simply refused to tell me, no matter
>> what I tried. (IIRC I was searching for C++ files which include a
>> specific
>> header or something like that. I ended up having to figure that out by
>> other means.)
>
> Seems like you have the same problem as me.
Google for messages about search not finding [programming language name]
files in [windows version]. The general trick is to tell windows to index
these files and not just the default ones but how to do this is
version-specific (and well-hidden, particularly in XP). It's indeed annoying
(I have to search for this at least once a year) but it's not exactly
difficult to find for folks who program for a living ;)
G.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Gilles Tran wrote:
> index these files and not just the default ones but how to do this is
> version-specific (and well-hidden, particularly in XP).
I wish there was a way to tell Vista to back up the files I want it to back
up. But nooooooo, MS figures you'd *never* want an exe file backed up, even
if it's in your home directory.
Which spoils what would otherwise be a quite useful tool. Had to script my
own, dammit. :-)
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Orchid XP v8" <voi### [at] dev null> wrote in message
news:4bcf3d9c$1@news.povray.org...
<snip>
> As part of the Disaster Recovery plan I keep going on about, I had to set
> up a PC with two NICs and configure it as a NAT router. Now, in fairness,
> as far as I can tell Windoze can't do this *at all*. But it was pretty
> hard to do from Linux either.
<snip>
Absolute rubbish, Windows is quite capable of doing exactly this.
Why do you spell Windows incorrectly it all the time btw?
Cheers Dre
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 21 Apr 2010 12:20:25 -0700, Darren New wrote:
> I'm pretty sure that's not part of Yast, tho.
Yep, it is - firewall configuration, masquerading. That should do it.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 21 Apr 2010 19:02:05 +0100, Orchid XP v8 wrote:
> I throught that grep is an overly-complicated way of searching for the
> location of a string within one particular file? (I usually just use my
> text editor's "search" function.)
Does your editor support regular expressions? Most only support a
simple substring search.
As Warp said, you also can traverse a directory structure with grep to
find the file(s) that have the string in them.
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jim Henderson wrote:
> On Wed, 21 Apr 2010 12:20:25 -0700, Darren New wrote:
>
>> I'm pretty sure that's not part of Yast, tho.
>
> Yep, it is - firewall configuration, masquerading. That should do it.
Cool, thanks! Now that you mention it, I remember hearing that term.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> The thing I refused to explain (such as finding text in document
> comments but not document content) isn't trivial in Linux, either.
For example, say you wanted a chart of the top ten memory usage processes,
as a pretty chart, in a word processing document.
http://channel9.msdn.com/posts/matthijs/C-40-and-beyond-by-Anders-Hejlsberg/
Go to about 46:25 there. Look at the listing. This says "take the processes
running from the kernel, sort by descending size, put the first ten in
Excel, tell Excel to draw a chart of it, copy the chart onto the clipboard,
and paste it into Word." And it's about as many lines long as those number
of sentences. *That* is what I'm talking about in terms of complex files.
And you can do that from every scripting and compiled language on Windows
that supports COM, and I've yet to find one that didn't.
As you can see, grepping thru a directory of excel spreadsheets for ones
that use both "sin" and "cos" in the same formula would be a pretty easy
program to write, if you needed something like that.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 21 Apr 2010 17:38:11 -0700, Darren New wrote:
> Jim Henderson wrote:
>> On Wed, 21 Apr 2010 12:20:25 -0700, Darren New wrote:
>>
>>> I'm pretty sure that's not part of Yast, tho.
>>
>> Yep, it is - firewall configuration, masquerading. That should do it.
>
> Cool, thanks! Now that you mention it, I remember hearing that term.
I do wish all the vendors (not just Linux vendors, but all vendors who
deal in this stuff) would decide on one term to use for this, because it
is quite confusing. :-)
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Note that all the interactions with explorer are via COM. If you wanted
> to change how Gnome or KDE displays that sort of thing, out of curiosity,
> what
> would you do? (Serious question there.) Would you have to change source
> code, or is there some sort of interface like COM or REXX or something to
> allow access?
In Dolphin (the default file browser for KDE), the columns seem to be very
hardcoded, and it has no plugin system. It doesn't even have built-in
features for eg. showing image size in pixels.
I don't use GNOME. However Nautilus seems to have a full plugin system and
it looks pretty powerful:
http://library.gnome.org/devel/platform-overview/stable/nautilus.html.en
http://library.gnome.org/devel/libnautilus-extension/stable/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Jim Henderson wrote:
> would decide on one term to use for this,
They did. The problem is that the term they picked is "NAT with DHCP".
Or "Network address translation with dynamic host control protocol", which
isn't really much better.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
> I don't use GNOME. However Nautilus seems to have a full plugin system and
> it looks pretty powerful:
> http://library.gnome.org/devel/platform-overview/stable/nautilus.html.en
> http://library.gnome.org/devel/libnautilus-extension/stable/
Looks like it does much the same thing as Windows, except without so much
documentation. ;-)
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 21 Apr 2010 19:36:29 -0700, Darren New wrote:
> Jim Henderson wrote:
>> would decide on one term to use for this,
>
> They did. The problem is that the term they picked is "NAT with DHCP".
>
> Or "Network address translation with dynamic host control protocol",
> which isn't really much better.
LOL
Point. :-)
Jim
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 04/21/10 14:02, Darren New wrote:
> On the rare occasion I wanted exact byte counts, I used Properties. I
> find it more annoying that Linux doesn't put thousands-separators in
> numbers, so when it shows me the size of a 20G file, it takes me lots of
> staring to figure it out. :-)
Umm...I've said this to you lots of times: Use Midnight Commander
(although for this problem, there are lots of simple solutions).
--
To call a man an ass is to insult the jackass. M.Twain
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 04/21/10 07:19, Warp wrote:
> (Yeah yeah, I know, you can do everything you can do in Linux and far more.
> There are all these fancy scripting languages and whatnot, which you might be
> able to use if you install something and something else. Nothing really
> consistent, and always a pain.)
(aka the "Darren Disclaimer")
--
To call a man an ass is to insult the jackass. M.Twain
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Neeum Zawan wrote:
> On 04/21/10 14:02, Darren New wrote:
>> On the rare occasion I wanted exact byte counts, I used Properties. I
>> find it more annoying that Linux doesn't put thousands-separators in
>> numbers, so when it shows me the size of a 20G file, it takes me lots of
>> staring to figure it out. :-)
>
> Umm...I've said this to you lots of times: Use Midnight Commander
I don't want to learn a whole new way of doign things. When I care, I just
do the ls again with -h.
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Neeum Zawan wrote:
> On 04/21/10 07:19, Warp wrote:
>> (Yeah yeah, I know, you can do everything you can do in Linux and far more.
>> There are all these fancy scripting languages and whatnot, which you might be
>> able to use if you install something and something else. Nothing really
>> consistent, and always a pain.)
>
> (aka the "Darren Disclaimer")
I.e., "I find Windows difficult because it's not made for nerds by nerds, so
to make it as nerdy as Linux, I have to download some free programs and
install them." :-)
<Sound of tiny violins in the background. ;->
--
Darren New, San Diego CA, USA (PST)
Linux: Now bringing the quality and usability of
open source desktop apps to your personal electronics.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> You use your text editor to tell you which files in a directory structure
> contain a specified string? Talk about being overly complicated. grep is a
> way, way simpler way to do that.
Or, in Windows, you can just type the string into the top right of any
explorer view, in the box that says "Search". Assuming you haven't disabled
the indexing service it should be pretty fast (otherwise it needs to
actually manually search every byte of every file, which is obviously slow).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Now, in fairness,
>> as far as I can tell Windoze can't do this *at all*. But it was pretty
>> hard to do from Linux either.
>
> Windows = Internet Connection Sharing
> Linux = at least with openSUSE 11.2, YaST -> Firewall -> Masquerading.
> Two NICs need to be configured and running. You can even set port
> forwarding there.
Interesting. I thought ICS only works for dialup modems?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> Ever heard of the magical word "grep"? Do you know what it's used for in
>>> unix systems? If yes, and you understand why this utility has existed for,
>>> like, forever, then why are you asking "why would you evern want to do such
>>> a thing"?
>
>> I throught that grep is an overly-complicated way of searching for the
>> location of a string within one particular file? (I usually just use my
>> text editor's "search" function.)
>
> You use your text editor to tell you which files in a directory structure
> contain a specified string? Talk about being overly complicated. grep is a
> way, way simpler way to do that.
No, I mean... I thought grep can only search within a single file (as
can any decent text editor). I didn't realise it can search multiple files.
(I'm still having trouble thinking up a use-case for that. About the
only thing I can think of is trying to find out which header file
defines a particular symbol or something.)
>> I guess I don't very often edit large files...
>
> What does file size have to do with anything?
If it's a small file, you can search it just be scrolling through it and
looking with your eyes. You don't need an automated search facility. The
only real reason to use an automated search is if there's too much data
to hunt through manually.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> I throught that grep is an overly-complicated way of searching for the
>> location of a string within one particular file? (I usually just use my
>> text editor's "search" function.)
>
> Does your editor support regular expressions? Most only support a
> simple substring search.
Is there some advantage to supporting regular expressions?
I mean, I realise that hypothetically a regex can find things that a
normal search can't. But in reality, when are you *ever* going to use
that? What would it be useful for?
> As Warp said, you also can traverse a directory structure with grep to
> find the file(s) that have the string in them.
I didn't know that. I thought grep was just for searching within one file.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> "Windows is easy for a beginner to use" is a surprisingly widespread
> misconception. I don't understand where it comes from. Probably Microsoft
> propaganda.
LOL! Yeah, well, few companies are going to boast about their products
being *hard* to use, are they? ;-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> ...so how do you actually do this then?
>
> That's what the whole COM thing is all about, along with things like
> "Windows Scripting Host" and "Power Shell".
From what I've seen, you can't touch COM unless you're programming in C
or C++.
Similarly, I thought WSH was just a way of running JavaScript without
having to put it into a web browser? It's news to me that you can
actually do anything new with it.
I have no idea what Power Shell is.
Last time I checked, neither WSH nor Power Shell comes with Windows. You
said "all of this is trivial using only the scripting tools that come
with Windows". So how exactly do you do this then?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> <Sound of tiny violins in the background. ;->
Show me a violin that *isn't* tiny. ;-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Does anybody else have this problem? Or is it just me?
>
> I love tabbed browsing. Then I have more space on the taskbar for all my
> other windows.
I too prefer tabbed browsing. Which is weird, because, as stated, it
tends to cause me to have more trouble switching between documents. And
yet I prefer it? That's totally illogical! o_O
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> I put the task bar on the side. I can probably put 40 tabs on there
> before it gets close to full.
Logically that makes sense - especially if you have a widescreen
monitor. But that would just be too weird - for no better reason than
"it's not what I'm used to".
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible <voi### [at] dev null> wrote:
> >> ...so how do you actually do this then?
> >
> > That's what the whole COM thing is all about, along with things like
> > "Windows Scripting Host" and "Power Shell".
>
> From what I've seen, you can't touch COM unless you're programming in C
> or C++.
VBscript, (Iron)Python, VBA, C#, VB.net, ASP(.net) and so on and so on.
All can use COM.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> From what I've seen, you can't touch COM unless you're programming in C
>> or C++.
>
> VBscript, (Iron)Python, VBA, C#, VB.net, ASP(.net) and so on and so on.
> All can use COM.
All languages I'm unlikely to ever touch. ;-)
Well, except maybe VBA... As far as I know, if you want custom functions
in Excel, you *must* use VBA, horrid as it is.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Interesting. I thought ICS only works for dialup modems?
LOL, I was using it 10 years ago for sharing my net connection at
University. You right clicked on the network adapter and ticked the "share
this connection" checkbox, then just point your other machine to that one
and it worked.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> (I'm still having trouble thinking up a use-case for that. About the only
> thing I can think of is trying to find out which header file defines a
> particular symbol or something.)
I use the Windows search (which searches within files) quite a lot when
looking for which source file contains certain code. Outside of
programming/development I can't think of many other common cases (maybe you
are looking for a certain phrase within a letter you wrote?).
> If it's a small file, you can search it just be scrolling through it and
> looking with your eyes. You don't need an automated search facility. The
> only real reason to use an automated search is if there's too much data to
> hunt through manually.
If a file is big enough to need scrolling, it's going to be faster to ask
the editor to search for it than using your eyes.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> (I'm still having trouble thinking up a use-case for that. About the
>> only thing I can think of is trying to find out which header file
>> defines a particular symbol or something.)
>
> I use the Windows search (which searches within files) quite a lot when
> looking for which source file contains certain code. Outside of
> programming/development I can't think of many other common cases (maybe
> you are looking for a certain phrase within a letter you wrote?).
All I can say is that apparently I don't deal with volumes of data large
enough to make searching necessary. (Then again, I always thought that
if you have to *search* your files, you haven't organised them properly...)
>> If it's a small file, you can search it just be scrolling through it
>> and looking with your eyes. You don't need an automated search
>> facility. The only real reason to use an automated search is if
>> there's too much data to hunt through manually.
>
> If a file is big enough to need scrolling, it's going to be faster to
> ask the editor to search for it than using your eyes.
I guess it depends on whether you *know* precisely what you're searching
for, or whether you're looking for "something that might be to do with
the IP address"...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> ...so how do you actually do this then?
Save the text below as "demoScript.vbs" and double-click it. It will write
a list of all files in your C: drive to a text file called "FileList.txt".
Obviously way more complex stuff can be done (like recursing subdirectories
if you want). Google "VBscript tutorial".
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = "C:\"
Set NewFile = fso.CreateTextFile(sFolder&"\FileList.txt", True)
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
For each folderIdx In files
NewFile.WriteLine(folderIdx.Name)
Next
NewFile.Close
Wscript.Echo "Done!"
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> All I can say is that apparently I don't deal with volumes of data large
> enough to make searching necessary. (Then again, I always thought that if
> you have to *search* your files, you haven't organised them properly...)
Usually it's folders of files which are not from me (eg a programming
library) which I find I need to search.
Also the folder system used on most file systems only lets you put a file
into one location (unless you get tangled up with soft and hard links or
hundreds of shortcuts). With a proper DMS a file should be filed under
several different categories (eg "Project A", "General electrical issues",
"Work done by Scott", "Work for customer X", etc). As this isn't easily
possible using Windows Explorer then the only option sometimes is to search.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> All I can say is that apparently I don't deal with volumes of data
>> large enough to make searching necessary. (Then again, I always
>> thought that if you have to *search* your files, you haven't organised
>> them properly...)
>
> Usually it's folders of files which are not from me (eg a programming
> library) which I find I need to search.
Ah, well maybe that's it then. I never ever work with files that I
didn't personally create.
> Also the folder system used on most file systems only lets you put a
> file into one location (unless you get tangled up with soft and hard
> links or hundreds of shortcuts). With a proper DMS a file should be
> filed under several different categories (eg "Project A", "General
> electrical issues", "Work done by Scott", "Work for customer X", etc).
> As this isn't easily possible using Windows Explorer then the only
> option sometimes is to search.
Hee, apparently our DMS isn't "propper". :-D
Then again, our software evaluation process was "Write the spec.
Research available options. Perform a detailed evaluation on all the
available products. Determine which one best fits the business need.
Purchase the cheapest product anyway."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> ...so how do you actually do this then?
>
> Save the text below as "demoScript.vbs" and double-click it. It will
> write a list of all files in your C: drive to a text file called
> "FileList.txt". Obviously way more complex stuff can be done (like
> recursing subdirectories if you want).
Several interesting things happening here...
1. SciTE recognises Pascal and COBOL, but not VB?
2. This script somehow works, even though I haven't installed WSH.
3. It really takes that much code just to do the same task as DIR /B C:\
> C:\FileList.txt?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott <sco### [at] scott com> wrote:
> > You use your text editor to tell you which files in a directory structure
> > contain a specified string? Talk about being overly complicated. grep is a
> > way, way simpler way to do that.
> Or, in Windows, you can just type the string into the top right of any
> explorer view, in the box that says "Search".
I wish it worked. It doesn't.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Or, in Windows, you can just type the string into the top right of any
>> explorer view, in the box that says "Search".
>
> I wish it worked. It doesn't.
Works fine here - I just tested it by typing in "Vector3" (used in XNA game
studio to represent a 3D vector) and within about 1 second the explorer
window had filled up with lots of C# source code files, plus lots of POV
source files (I guess it uses Vector3 too).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible <voi### [at] dev null> wrote:
> No, I mean... I thought grep can only search within a single file (as
> can any decent text editor). I didn't realise it can search multiple files.
You tell it which files it should search, like:
grep 'abc' file1.txt file2.txt file3.txt
Of course if you are in a command line shell, you can use the shell to aid
you in specifying more files by using a pattern, eg:
grep 'abc' file*.txt
(Note that it's the shell that expands the pattern to actual file names,
not grep.)
> (I'm still having trouble thinking up a use-case for that. About the
> only thing I can think of is trying to find out which header file
> defines a particular symbol or something.)
'grep' is one of the most used utilities in Unix systems. It's quite handy
for many, many things. The reason why it's useful is because as it prints
the found results to stdout, you can pipe them to something else, which may
then do something with those results, and so on. Using 'grep' as part of such
a chain of commands is pretty common.
Of course 'grep' is useful all in itself as well, if you want to find files
which contain a certain string.
> >> I guess I don't very often edit large files...
> >
> > What does file size have to do with anything?
> If it's a small file, you can search it just be scrolling through it and
> looking with your eyes. You don't need an automated search facility. The
> only real reason to use an automated search is if there's too much data
> to hunt through manually.
What if you have 50 small files?
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> 2. This script somehow works, even though I haven't installed WSH.
http://en.wikipedia.org/wiki/VBScript
> 3. It really takes that much code just to do the same task as DIR /B C:\
> > C:\FileList.txt?
Obviously it's just a simple example so you can see how it works.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible <voi### [at] dev null> wrote:
> I mean, I realise that hypothetically a regex can find things that a
> normal search can't. But in reality, when are you *ever* going to use
> that? What would it be useful for?
Maybe you should start reading more about regular expressions, and why
they can be useful. I'm pretty sure there are regexp libraries for Haskell
as well.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> I mean, I realise that hypothetically a regex can find things that a
>> normal search can't. But in reality, when are you *ever* going to use
>> that? What would it be useful for?
>
> Maybe you should start reading more about regular expressions, and why
> they can be useful. I'm pretty sure there are regexp libraries for Haskell
> as well.
There are. Several different kinds, in fact. (Apparently there's more
than one possible regex syntax or something.)
I still don't get why you'd need to do complex searching. And if for
some strange reason you do need to, why use an obfuscated text string
with limited processing capabilities when you can use a real programming
language?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Exactly my point. Write a program in Linux that walks a directory tree and
> does *not* account for soft links (or "..") and you have a problem.
And that's the reason why they are not supported in Unix systems?
(Oops, they are! Why, since they are so extremely dangerous?)
> > I don't want to see it in a separate dialog. I want to see it in the file
> > listing.
> http://www.codeproject.com/KB/shell/shellextguideindex.aspx
> More specifically,
> http://www.codeproject.com/kb/shell/ShellExtGuide8.aspx
So in order to get Windows Explorer to show exact byte counts, I would have
to download and install Visual Studio, get it to work, write an extension
manually, install it, and keep it with me in an USB stick so that I can
install it in a friend's computer if I ever want to see the byte sizes there
as well?
I think you made some kind of claim containing the word "trivial" in some
post of yours.
> >> And which byte count do you want?
> >
> > The size of the file. How many bytes it contains. If I opened it with a
> > program and started reading bytes, how many I would get before EOF.
> Open it raw, or processed, or for backup?
You are nitpicking, and you know it.
Windows Explorer already shows the actual size of the file. The major
problem is that it shows it *rounded* to kilobytes, megabytes or gigabytes
rather than showing the exact byte count, and there is no setting to make
it show the size in bytes. *That* is the problem.
You are inventing some kind of issue that is not the problem at all, just
for the sake of argument. Why do you do that? You understand perfectly what
I mean. Is agreeing with something really so hard?
> On the rare occasion I wanted exact byte counts, I used Properties. I find
> it more annoying that Linux doesn't put thousands-separators in numbers, so
> when it shows me the size of a 20G file, it takes me lots of staring to
> figure it out. :-)
Yeah, because there's exactly one single way of listing files in "Linux".
Konqueror uses thousands-separators in file sizes.
> > Seeing the exact size of a file is a pretty common and useful thing to
> > want.
> For programmers, yes. Not for regular users. And you can see it with one
> extra step. :-)
So if I want to see the individual byte sizes of 20 files, exactly how do
I do that "with one extra step"?
What harm could there be if Windows Explorer had an option to show file
sizes in bytes?
Each file in a list having its size shown with a different unit is
confusing. You can't visually see which of the files are larger and
which ones are smaller. You have to spend time looking at the units in
order to get an idea. There's no visual feedback to tell you that.
> > Except that it doesn't tell that. If you try to copy it to another file
> > system or an archive file, it will most probably end up taking a completely
> > different amount of space.
> Hence the "which size do you want" question. :-)
The amount of bytes in the file. What's so damn hard to understand about
that?
> That's another good point:
> if it's an archive, do you want the size of the archive, the size of the
> total files in the archive, etc? :-)
The amount of bytes in the file. What's so damn hard to understand about
that?
> > Showing how much disk space a file takes is *useless* information. *That*
> > is what should be in some info dialog. The file listing should show the
> > exact byte size. Apple has done it completely in reverse of what it should be.
> I think showing it as a readable size ("1.7 meg") is reasonable.
It may be reasonable for *one* file. It's unreasonable when you have 50
files, each with different size units.
> Showing it
> as "size in bytes" and "size on disk" are fine too.
But Apple has decided to completely hide the actual size of the file from
the file listing, for some incomprehensible reason.
> > Yeah, start doing that to a dozen files, rather than seeing it in one
> > glance in the file listing. It *is* extremely inconvenient.
> If I want the total, I pick a dozen files and say "properties" and it tells
> me the total.
Do you have reading comprehension problems? I was not talking about totals.
> If I want to compare some in one window with some in another,
> it's mildly more tedious. I might even have to open a shell script or
> something. But even as a nerd, I don't do that too often. Mostly after doing
> a download, to make sure I got all the bytes.
Why are you defending Microsoft on this? I don't get it. What possible harm
could there be, if there was some option somewhere to make Explorer show file
sizes in bytes instead of rounding them?
> No, they *can* make that possible. You're not their target audience
> (namely, a nerd who doesn't program Windows). Hence, they haven't
> implemented it. They spent their time on other things.
Yeah, I see how implementing that would take years and years of work.
This coming from the same person who in this very article posted links to
tutorials where you could make an extension to do exactly that.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> 2. This script somehow works, even though I haven't installed WSH.
>
> http://en.wikipedia.org/wiki/VBScript
Much digging later: It seems that WSH is no longer a seperate download.
Apparently it now comes bundled with Windows and is installed by default.
Obviously, this makes a pretty dramatic difference. Nobody (except maybe
me) is going to go to the Microsoft download site and search for
"Windows Script Host" and download and install the file. In other words,
nobody's PC will ever have this installed. But now that it comes with
Windows itself, it'll be installed absolutely everywhere...
>> 3. It really takes that much code just to do the same task as DIR /B
>> C:\ > C:\FileList.txt?
>
> Obviously it's just a simple example so you can see how it works.
Wikipedia seems to indicate that WSH supports JavaScript. I wonder if I
can get that to work...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> No, I mean... I thought grep can only search within a single file (as
>> can any decent text editor). I didn't realise it can search multiple files.
>
> You tell it which files it should search, like:
>
> grep 'abc' file1.txt file2.txt file3.txt
I didn't know you could do that. (Then again, I've never used grep, so...)
> Of course if you are in a command line shell, you can use the shell to aid
> you in specifying more files by using a pattern, eg:
>
> grep 'abc' file*.txt
>
> (Note that it's the shell that expands the pattern to actual file names,
> not grep.)
Heh. I didn't know the shell could do that either. (Although you didn't
specify *which* shell - Unix has several...)
>> (I'm still having trouble thinking up a use-case for that. About the
>> only thing I can think of is trying to find out which header file
>> defines a particular symbol or something.)
>
> 'grep' is one of the most used utilities in Unix systems. It's quite handy
> for many, many things. The reason why it's useful is because as it prints
> the found results to stdout, you can pipe them to something else, which may
> then do something with those results, and so on. Using 'grep' as part of such
> a chain of commands is pretty common.
>
> Of course 'grep' is useful all in itself as well, if you want to find files
> which contain a certain string.
I'm still not seeing what's so useful about being able to search a file
for something.
Now, I suppose if you were trying to script something, being able to
pipe output from another command into grep so that it can grab a
particular substring that you can then pipe to something else might be
useful. But then, if *I* wanted to do something like that, I wouldn't
script it. I'd write a real program, not a script.
>> If it's a small file, you can search it just be scrolling through it and
>> looking with your eyes. You don't need an automated search facility. The
>> only real reason to use an automated search is if there's too much data
>> to hunt through manually.
>
> What if you have 50 small files?
Maybe that's the difference. I never have 50 small files.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |