POV-Ray : Newsgroups : povray.off-topic : Very cool Ubuntu distro Server Time
9 Oct 2024 12:19:52 EDT (-0400)
  Very cool Ubuntu distro (Message 14 to 23 of 43)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: scott
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 05:23:18
Message: <49ddbe86$1@news.povray.org>
> (E.g., you try finding a tool that can compute the MD5 sums of all the 
> files in a given folder and write them into a text file.

Umm I typed into google "md5 checksum windows", the 2nd result looked 
promising so I clicked it, and it seems to offer a free command-line tool 
that does exactly what you want.  It took like 10 seconds, Linux takes 
longer than that to boot.

> Under Windows... well, there's a CLI tool that will compute the MD5 sum 
> for *one* file, but you try scripting it to process several...)

If you have ever done any windows scripting it should be a piece of cake, 
this is pretty standard stuff for dealing with files in scripts:

Set FSO = CreateObject("Scripting.FileSystemObject")
Set Folder = FSO.GetFolder("folder name")
Set Files = Folder.Files
For Each File in Files
  do something with File.Name here
Next


Post a reply to this message

From: Invisible
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 05:48:42
Message: <49ddc47a$1@news.povray.org>
>> (E.g., you try finding a tool that can compute the MD5 sums of all the 
>> files in a given folder and write them into a text file.
> 
> Umm I typed into google "md5 checksum windows", the 2nd result looked 
> promising so I clicked it, and it seems to offer a free command-line 
> tool that does exactly what you want.  It took like 10 seconds, Linux 
> takes longer than that to boot.

Except that the Linux MD5 tool can automatically compute the MD5 sum of 
multiple files. I have only found one tool for Windows that can do this, 
and it was buggy as hell. (Kept printing garbage characters to stdout, 
got confused by certain pathnames, etc.)

>> Under Windows... well, there's a CLI tool that will compute the MD5 
>> sum for *one* file, but you try scripting it to process several...)
> 
> If you have ever done any windows scripting it should be a piece of 
> cake, this is pretty standard stuff for dealing with files in scripts:
> 
> Set FSO = CreateObject("Scripting.FileSystemObject")
> Set Folder = FSO.GetFolder("folder name")
> Set Files = Folder.Files
> For Each File in Files
>  do something with File.Name here
> Next

What the hell language is *that*?!


Post a reply to this message

From: scott
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 07:39:49
Message: <49ddde85$1@news.povray.org>
> Except that the Linux MD5 tool can automatically compute the MD5 sum of 
> multiple files. I have only found one tool for Windows that can do this, 
> and it was buggy as hell. (Kept printing garbage characters to stdout, got 
> confused by certain pathnames, etc.)

The one I found seemed to offer that too.

http://www.fastsum.com/support/user%20manual.php

>> Set FSO = CreateObject("Scripting.FileSystemObject")
>> Set Folder = FSO.GetFolder("folder name")
>> Set Files = Folder.Files
>> For Each File in Files
>>  do something with File.Name here
>> Next
>
> What the hell language is *that*?!

VBscript, it's what most people use to write scripts on windows, isn't it?

http://www.microsoft.com/technet/scriptcenter/topics/beginner/firststeps.mspx


Post a reply to this message

From: Invisible
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 07:48:24
Message: <49dde088$1@news.povray.org>
>> Except that the Linux MD5 tool can automatically compute the MD5 sum 
>> of multiple files. I have only found one tool for Windows that can do 
>> this, and it was buggy as hell. (Kept printing garbage characters to 
>> stdout, got confused by certain pathnames, etc.)
> 
> The one I found seemed to offer that too.

What, wildcards or bugginess? :-}

>> What the hell language is *that*?!
> 
> VBscript, it's what most people use to write scripts on windows, isn't it?

Actually I just write DOS scripts. If I need anything more complex, I 
write Haskell.

As a matter of fact, I wrote an MD5 program in Haskell. But it turns out 
not to be very fast...


Post a reply to this message

From: scott
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 08:00:57
Message: <49dde379$1@news.povray.org>
> Actually I just write DOS scripts. If I need anything more complex, I 
> write Haskell.

There's always this: :-)

http://en.wikipedia.org/wiki/Windows_PowerShell

> As a matter of fact, I wrote an MD5 program in Haskell. But it turns out 
> not to be very fast...

Hehe, not surprising.


Post a reply to this message

From: Warp
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 08:43:39
Message: <49dded7b@news.povray.org>
scott <sco### [at] scottcom> wrote:
> If you have ever done any windows scripting it should be a piece of cake, 

  That seems to be a problem with Windows: It simply doesn't invite you
to do things by scripting.

  I have been a regular Windows user for over 10 years, yet I don't have
the slightest idea about vbscripts nor even how you could even run them.
Can you run them directly? Do you need some kind of interpreter for it?
Does Windows support them by default, or do you need to install something?
I really don't have the slightest idea. I don't even know where to start.

  I have also been a regular Unix user for over 10 years, and I'm somewhat
fluent in shell scripting. I'm in fact so used to it, that I find a terminal
emulator much more comfortable for browsing and handling files than a
graphical file browser (even though all linux distros have both).

  I can't say which system I have used more overall, but I think it's
rather telling that in one system I'm pretty fluent with its scripting,
while in the other I don't have the faintest idea where to even start
looking. There is just some fundamental difference in these two systems
which causes different natural way of thinking.

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 08:58:17
Message: <49ddf0e9$1@news.povray.org>
>> Actually I just write DOS scripts. If I need anything more complex, I 
>> write Haskell.
> 
> There's always this: :-)
> 
> http://en.wikipedia.org/wiki/Windows_PowerShell

Yeah. Looks like my perfectly working login scripts are going to be 
replaced with this at some point. For one reason or another, the guys 
from HQ seem to like to do things in the most complex and difficult way 
possible. I guess it makes them feel superior or something...

>> As a matter of fact, I wrote an MD5 program in Haskell. But it turns 
>> out not to be very fast...
> 
> Hehe, not surprising.

Come back after *you* have implemented MD5 _correctly_. It's nontrivial 
to get it to work properly. :-P (There are all kinds of gotchas about 
using little-endian integers, doing padding correctly, etc.)


Post a reply to this message

From: Invisible
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 09:03:12
Message: <49ddf210$1@news.povray.org>
Warp wrote:

>   That seems to be a problem with Windows: It simply doesn't invite you
> to do things by scripting.

I guess that's because it's "designed for novicies".

On the other hand, just about every tool in MS Office comes with VBA. 
It's just that Windows itself doesn't really invite you to script it.

>   I have been a regular Windows user for over 10 years, yet I don't have
> the slightest idea about vbscripts nor even how you could even run them.
> Can you run them directly? Do you need some kind of interpreter for it?
> Does Windows support them by default, or do you need to install something?
> I really don't have the slightest idea. I don't even know where to start.

The DOS scripts I usually write work regardless. (*.bat, or *.cmd for NT 
or later.) As I understand it, to run exotic languages like VBScript or 
JavaScript, you need the Windows Script Host (WSH). This is an optional 
extra for NT 4.0, but comes with XP (and, presumably, later). I did have 
a look at using JavaScript in this capacity, but I couldn't find any 
documentation anywhere.

>   I have also been a regular Unix user for over 10 years, and I'm somewhat
> fluent in shell scripting. I'm in fact so used to it, that I find a terminal
> emulator much more comfortable for browsing and handling files than a
> graphical file browser (even though all linux distros have both).

I find a GUI to be a superior way of *viewing* files (in general), but 
the CLI can be a superior way of *working on* files. From a command 
prompt, I can easily say "del *.png", but no GUI I've ever seen offers 
similar functionallity.

Sometimes I fantasise about writing my own file manager. It's right up 
there next to my various other unfinished projects. :-/


Post a reply to this message

From: Darren New
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 11:56:54
Message: <49de1ac6@news.povray.org>
scott wrote:
> Umm I typed into google "md5 checksum windows", 

And, fwiw, the term "win32" usually gives better hits than "windows" if 
you're looking for ports of GNU stuff to native windows.

>> Under Windows... well, there's a CLI tool that will compute the MD5 
>> sum for *one* file, but you try scripting it to process several...)
> 
> If you have ever done any windows scripting it should be a piece of 
> cake, this is pretty standard stuff for dealing with files in scripts:
> 
> Set FSO = CreateObject("Scripting.FileSystemObject")
> Set Folder = FSO.GetFolder("folder name")
> Set Files = Folder.Files
> For Each File in Files
>  do something with File.Name here
> Next

Or just
for %I in (*.txt) do md5 %I >>checksums.txt
or whatever parameters you want. It's not like Windows doesn't have a shell. :-)

-- 
   Darren New, San Diego CA, USA (PST)
   There's no CD like OCD, there's no CD I knoooow!


Post a reply to this message

From: Invisible
Subject: Re: Very cool Ubuntu distro
Date: 9 Apr 2009 12:05:17
Message: <49de1cbd$1@news.povray.org>
>> If you have ever done any windows scripting it should be a piece of 
>> cake, this is pretty standard stuff for dealing with files in scripts:
>>
>> Set FSO = CreateObject("Scripting.FileSystemObject")
>> Set Folder = FSO.GetFolder("folder name")
>> Set Files = Folder.Files
>> For Each File in Files
>>  do something with File.Name here
>> Next
> 
> Or just
> for %I in (*.txt) do md5 %I >>checksums.txt
> or whatever parameters you want. It's not like Windows doesn't have a 
> shell. :-)

Does that work recursively?

Slightly more fun is trying to make it produce the exact same output as 
the Unix MD5 tool so it's portable between OSes... ;-)


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.