ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Tally folder contents by file date

<< < (3/4) > >>

wraith808:
wraith808, beautifully done.  Thanks a million.

TallyFiles -d "C:\Windows System Tools" -o "Windows System Tools.txt"

Two enhancement requests:

1.  Allow the default output file save location be to where TallyFiles.exe resides and is executed from (via batch file there) (instead of folder being acted upon, presently the default save location).

Thus, command would be merely:

TallyFiles -d "C:\Windows System Tools"

(and .txt extension would be added to "Windows System Tools")

2.  I specified "Creation Date."  Could we have the option of "Date Modified"?

You might already be allowing for this through your -c, --compare option.  But I don't understand how it works, if so.

Great job!

Thanks again.

Nicholas


-nkormanik (September 26, 2018, 12:57 AM)
--- End quote ---


I can do the first easily... will update later today.  As far as the second, the -c is the way to do that.  Three properties on the FileInfo object in windows are: [C]reation Date or Last [A]ccess Date or Last [W]rite Date.

I know last write date is the last day it was written (i.e. modified) and the create date is pretty obvious.  I haven't been able to figure out how it computes last access date.  So to change your command line above. 


--- Code: Text ---TallyFiles -d "C:\Windows System Tools" -c W
And even currently, you don't have to put output; it infers it from the folder name.  You only have to specify that if you want a different name from the folder name.

nkormanik:
Output file still ends up in 'acted-upon' folder.

Prefer output file to be created in folder where TallyFiles.exe resides.

Thanks!

nkormanik:
Curiously the -c W parameter gives some really early dates.  Not sure what it's doing.

Different from 'Date Modified'.

Prefer 'Date Modified' option, along with the default 'Date Created'.

Thanks!

wraith808:
I hadn't updated it yet; unfortunately, I've been a bit busy at work.  It is now updated to save in the run directory by default, though I did add another command line param:


--- Code: Text ---[Option('s', "savedir", Required=false, HelpText = "Save directory.  By default the file stored the in directory where tallyfiles is run")]
As far as the limitations of what it does with the dates, it's a limitation of the information that windows stores in the FileSystemInfo structure.

It has the following properties (and definitions)

FileSystemInfo.LastAccessTime: The time that the current file or directory was last accessed.

FileSystemInfo.CreationTime: Gets or sets the creation time of the current file or directory.

FileSystemInfo.LastWriteTime: Gets or sets the time when the current file or directory was last written to.

nkormanik:
Beautiful job, wraith808.  Thanks very much.

Skwire, another winner.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version