last-modified

Get Last Write Time is returning a strange value

青春壹個敷衍的年華 提交于 2019-12-23 13:27:04
问题 I'm trying to get the last modified date of a file in Windows 7 - I just edited it, so in the properties, the Last Modified value is listed as 11/30/2013 4:55 PM . However, when I access the file using: DateTime lastMod = File.GetLastWriteTime(file); I output the value: MessageBox.Show(lastMod.toString()); This always gives 12/31/1600 6:00:00 PM , regardless of which file I'm working with, regardless of creation time, modification time, etc. 回答1: I suspect you're using the wrong file name.

How to change the file's permission and last modified in Java?

岁酱吖の 提交于 2019-12-22 16:29:39
问题 To my knowledge, Java's File class does not support to change the file's permission and last modified date. Is there any proper way to do this in a cross-platform style? 回答1: I'm looking at the Java 6 documentation, and there is a setLastModified() method, as well as setReadable(...) and setWritable(...) and setExecutable(...) methods (all in the java.io.File class). So yes, there is a way... 来源: https://stackoverflow.com/questions/459622/how-to-change-the-files-permission-and-last-modified

How to change the file's permission and last modified in Java?

和自甴很熟 提交于 2019-12-22 16:29:10
问题 To my knowledge, Java's File class does not support to change the file's permission and last modified date. Is there any proper way to do this in a cross-platform style? 回答1: I'm looking at the Java 6 documentation, and there is a setLastModified() method, as well as setReadable(...) and setWritable(...) and setExecutable(...) methods (all in the java.io.File class). So yes, there is a way... 来源: https://stackoverflow.com/questions/459622/how-to-change-the-files-permission-and-last-modified

Retrieve modified DateTime of a file from an FTP Server

[亡魂溺海] 提交于 2019-12-22 13:30:39
问题 Is there a way to find the modified date/time for files on an FTP server in R? I have found a great way to list all of the files that are available, but I only want to download ones that have been updated since my last check. I tried using: info<-file.info(url) However, it returns a pretty ugly list of nothing. My url is made up of: "ftp://username:password@FTPServer//filepath.xml" 回答1: Until we see the output from this particular FTP server (they are all different) for directory listings,

How can I extract Last Modified Date in MS Azure for a blob in my blob storage

久未见 提交于 2019-12-22 09:07:49
问题 I am pretty new to the world of MS Azure. I am trying to get the filenames and the last modified date for a bunch of files (block blobs) kept in my blob storage using Python. Here is the code that I am using: import datetime from azure.storage.blob import BlockBlobService blob_service = BlockBlobService(account_name=account, account_key=acckey,protocol='http', request_session=sess) blob_service.get_blob_to_path(container, pdfname, pdflocal) generator = blob_service.list_blobs(container)

Is it possible to get last modified date from an assets file?

南笙酒味 提交于 2019-12-22 02:04:25
问题 Bizarre question: is it possible to get the last modified date of a file in the assets folder, or would that be pointless and impossible? I ask because I'm copying a read-only database out of there into the data folder on application start up, but would rather only perform the copy if the existing file is older than the one stored in the assets folder (or if the file doesn't exist). If that's not possible, anyone know of a better convention? I can post that in a separate question if needed.

Python: Get a list of all files and folders in a directory, the time of creation, the time of last modification. System independent solution?

∥☆過路亽.° 提交于 2019-12-21 11:02:10
问题 This is a challenge as well as a question: I have a folder of data files. I want the following list of lists of information: Filename: Created: Last modified: Information = [ [datafile1, Mon Mar 04 10:45:24 2013, Tue Mar 05 12:05:09 2013], [datafile2, Mon Mar 04 11:23:02 2013, Tue Apr 09 10:57:55 2013], [datafile2.1, Mon Mar 04 11:37:21 2013, Tue Apr 02 15:35:58 2013], [datafile3, Mon Mar 04 15:36:13 2013, Thu Apr 18 15:03:25 2013], [datafile4, Mon Mar 11 09:20:08 2013, Mon May 13 16:30:59

C++ How to check the last modified time of a file

久未见 提交于 2019-12-21 07:55:43
问题 I'm caching some information from a file and I want to be able to check periodically if the file's content has been modified so that I can read the file again to get the new content if needed. That's why I'm wondering if there is a way to get a file's last modified time in C++. 回答1: There is no language-specific way to do this, however the OS provides the required functionality. In a unix system, the stat function is what you need. There is an equivalent _stat function provided for windows

VBA - How to get the last modified file or folder in a directory in Excel 2010

别等时光非礼了梦想. 提交于 2019-12-20 12:31:15
问题 What I want to do is more complex than selecting a file from a list of files. I will start in a directory, then I want to change to the most recently modified directory. I then want to repeat that process in a sub-directory, and then, inside of that, I want to select the most recently modified excel file and open it. What is the best approach to do this? What objects / methods should I be looking into? 回答1: The simplest function is FileDateTime(pathname) where pathname can be a directory for

BAT: if statement based on modify date of file

99封情书 提交于 2019-12-20 05:28:57
问题 I want to see if a lock file modify date is more than a 5 seconds ago or it in the future (indicating the PC clock was changed back). How can I say if file.modifydate < now - 5 seconds or modifydate > now run command a (command a will launch my Java app) else run command b (command b will send a UDP packet to a localhost port) 回答1: As Wimmel suggested, I will be using VBScript - well actually I will be using JScript in the same way VBScript would normally be used... because I am already