datecreated

Getting last modified date of a file not the last created date in Java

蓝咒 提交于 2020-01-15 11:36:37
问题 I had copied a file to my android device. When i check it's last modified date with file.lastModified() it returns the date the file was created which is just now. I want the original date when the file was last modified and not copied. I can see this date in windows explorer with the tag Date modified .The file.lastModified() matches with the Date created Tag of the file. If i could get the last Modified Date i can update the file with another file from server after it has been updated by

Getting last modified date of a file not the last created date in Java

ε祈祈猫儿з 提交于 2020-01-15 11:31:46
问题 I had copied a file to my android device. When i check it's last modified date with file.lastModified() it returns the date the file was created which is just now. I want the original date when the file was last modified and not copied. I can see this date in windows explorer with the tag Date modified .The file.lastModified() matches with the Date created Tag of the file. If i could get the last Modified Date i can update the file with another file from server after it has been updated by

Generate a list of the newest file in each subdirectory in windows batch

此生再无相见时 提交于 2019-12-23 03:53:15
问题 I have a need to determine what the newest file is in each subdirectory under a root folder and output that list to a text file showing both the filename and creation date. As an example, if the root directory is D:\Data which contains a total of 4 subdirectories, and one of those 4 contain a subdirectory, my output file should contain a list of only files (not including created folders) something like this: D:\Data\folder1\filename 02/12/14 D:\Data\folder2\filename 03/02/14 D:\Data\folder3

PowerShell: Change the timestamp (Date created) of a folder or file

天涯浪子 提交于 2019-12-22 08:32:03
问题 For PowerShell commands on Windows 10, I encounter a strange behaviour. To change a file's Date created, I use: Get-ChildItem C:\testFile1.txt | % {$_.CreationTime = '01/11/2005 06:00:36'} To change a folder's Date created, I use: Get-Item C:\testFolder1 | % {$_.CreationTime = '01/11/2004 22:13:36'} Those 2 commands work well on a regular basis on system partition C:\ or on desktop. The story is different if the folder exists on an external USB flash drive. (P.S. The command to change a file

How to get File Created Date and Modified Date [duplicate]

非 Y 不嫁゛ 提交于 2019-12-18 13:51:47
问题 This question already has answers here : Check last modified date of file in C# (4 answers) Closed 5 years ago . I have an .NET EXE file . I want to find the file created date and modified date in C# application. Can do it through reflection or with IO stream? 回答1: You could use below code: DateTime creation = File.GetCreationTime(@"C:\test.txt"); DateTime modification = File.GetLastWriteTime(@"C:\test.txt"); 回答2: You can do that using FileInfo class: FileInfo fi = new FileInfo("path"); var

Getting the original files create date upon upload

六月ゝ 毕业季﹏ 提交于 2019-12-08 07:56:52
问题 We have a process in place that uploads files to our website. It has become important to the users to be able to see when those files were created. I'm looking for a way to extract the original create date from the HttpPostedFile. If anyone has an idea for me I'd really appreciate it (I'm a bit stumped at this point). 回答1: You don't have access to the date the file was created on the client. You can use Fiddler to validate this. I believe the only data you'll see being posted is the filename

How can I find the newest .pl file in a directory and all its subdirectories using Perl?

牧云@^-^@ 提交于 2019-12-01 20:38:44
问题 How can I scan an entire directory's contents, including its subdirectories' contents, and find the newest .pl file within them using Perl? I want to build a sorted array/list of the full file paths of all .pl files within a directory tree. So, for example, if my base directory is /home/users/cheeseconqueso/ I want to search for .pl files in that directory and any subdirectory within that path and then sort the .pl files by date. The end result would be an array, @pl_paths , where $pl_paths[0

How can I find the newest .pl file in a directory and all its subdirectories using Perl?

早过忘川 提交于 2019-12-01 19:47:38
How can I scan an entire directory's contents, including its subdirectories' contents, and find the newest .pl file within them using Perl? I want to build a sorted array/list of the full file paths of all .pl files within a directory tree. So, for example, if my base directory is /home/users/cheeseconqueso/ I want to search for .pl files in that directory and any subdirectory within that path and then sort the .pl files by date. The end result would be an array, @pl_paths , where $pl_paths[0] would be something like /home/users/cheeseconqueso/maybe_not_newest_directory/surely_newest_file.pl

How to get File Created Date and Modified Date [duplicate]

主宰稳场 提交于 2019-11-30 16:47:14
This question already has an answer here: Check last modified date of file in C# 4 answers I have an .NET EXE file . I want to find the file created date and modified date in C# application. Can do it through reflection or with IO stream? You could use below code: DateTime creation = File.GetCreationTime(@"C:\test.txt"); DateTime modification = File.GetLastWriteTime(@"C:\test.txt"); You can do that using FileInfo class: FileInfo fi = new FileInfo("path"); var created = fi.CreationTime; var lastmodified = fi.LastWriteTime; File.GetLastWriteTime to Get last modified File.CreationTime to get