in reply to Working with folders in Perl and HTML

Wow. First: "get the size and the creation date/time a set of folders on a Windows Server (2012 r2)..."

The general idea of this is easy...But...you are using terminology that is confusing. The Unix file system doesn't have an idea of "file creation time", the idea of a "born on" date. The Windows NTFS system does have that "born on" idea. Perl can be used to access this specific Windows idea (with "extra work"), but usually that is not needed.

Normally in Windows and in Unix, the stuff that matters are the: a) time since this file was modified, b) time since this file was last accessed for r/w. The Windows idea of when a file was originally created is seldom used, even with Windows programs.

I don't understand your question. Can you give more details?
Normally what is needed is: a) last time file was accessed, b) time the file was modified.

  • Comment on Re: Working with folders in Perl and HTML

Replies are listed 'Best First'.
Re^2: Working with folders in Perl and HTML
by LinuxNoob (Initiate) on May 29, 2017 at 09:14 UTC
    Hey Marshall, The idea is just literally having a webpage on which you can see the size of a folder and its born on, nothing else. :)
      Hey, LinuxNoob,
      I think you will do fine with the standard Perl -M file test. If you are writing server code, I recommend code that works on both Unix and Windows. I would not assume that the target server is Windows - that could be and probably is a very bad assumption. I have written many Perl programs that work equally well on both Unix variants and Windows. See my reply to AnonMonk below re:"Born-on" time. This parameter is possible to get on Windows, but don't code that way unless you really need to do it and are aware of the incompatibility consequences.
Re^2: Working with folders in Perl and HTML
by Anonymous Monk on May 29, 2017 at 10:03 UTC
    Born in date nevere used? Heh
      I said: "seldom used". Seldom does NOT mean never!

      Most applications do not need the Windows "born-on" date in order to work very well. Geez, all Unix applications seem to get along fine without it...

      This Windows file system parameter does have its uses. However, my recommendation would be to not use it unless necessary. That means only do it if, a) if the standard Perl multi-platform file tests do not provide adequate information and b)you are willing to write O/S specific code. In the OP's case, probably the -M file test is just fine. The "born-on" date requires a call to a Windows specific API.