File Date Created Newer than Modified Date - filesystems

We have noticed a file come through a work flow which initially involves uploading the file from the clients computer to our server which the application there moves the completed file to a holding folder and then another application picks it up parses video information from it then moves it to a new folder.
After the entire flow completed it was noticed that Last modified date was older than when the file was even uploaded through the website and the date created was set to the time it was uploaded.
by the way the two dates were almost 24 hours apart.
any idea how this could happen>

It could have something to do with the way the files are processed, where the modified time is left to the time where the contents of the file changed, but the created time is when the file in the new location was created.
This happens, for example, when you download a zip file and unzip the contents. The created time is the time you extracted the archive, but the modified time is the time when the author last updated the contents. At least, that's what happens to me.
Keep in mind that time stamps on files are just properties of the file. Usually the OS takes care of updating them for you. But they can be changed at will if you know how.

Related

How to sync files of local filesystem to upload using angularJS

Basically what it means is let's say I upload a file, and then I make some changes to the file, for example, a .txt file. The uploaded file automatically syncs itself with the original file in the local system, we don't have to upload it again. And this will be done either as soon as there is a change or after a fixed interval of time. Is it possible using javascript(angularjs)?
I guess we will need the path of the file that we want to sync and read the file repeatedly after a set interval of time. But browsers are not allowed to access the full path so I am not sure how to proceed with this. Any suggestions would be helpful.

Need help picking up and moving a file with a dynamic name

I am trying to move a backup file that is created every morning from its current location to a shared network location but can not figure out how to code for dynamic dates in SQL.
Ex: The file is called my.file03232017130.bak and every day a new file will be saved with the same name except the 03232017130 will be changed to that days date.
I would like to utilize SSIS and SQL to set up a process that will move the file every morning from where it is saved by default to a different location.
Any help is appreciated.
Make a package variable and then set the value to the string using code depending on the current date in a Script Task, then use that variable in your File System Task.
Setup a File Watcher on the backup folder and utelize a File Transfer Task to send each file to the destination you want. You can do it without the 3rd party tools but it will take much longer to setup and usually runs into many windows related issues

Unity5 I lost my codes inside .cs file. C# files still exist, but codes gone

Unity 5.1.2f1 (64-bit) version.(windows 8.1) I closed Unity. After a while ago I opened Unity and I had some errors in Console.Then I clicked the error and I realized that I lost my code in some of my C# files.Then I checked folders of my scripts and I checked date modified section of my C# files.
Here is image of my problem.
http://www.imagesturk.net/images/2015/08/19/Capture662cb.md.png
as you can see, some of file's modified date is in 7th month and other's modified date is in 8th date. Problem is I just saved those file's (7th month) just couple of days.
I had this problem before as well. That time only few changes lost and I re-code those files, but not I lost hundreds lines of codes, so I can't re-code all same. Is there any way to recover those codes?

Monitoring for changes in folder without continuously running

This question has been asked around several time. Many programs like Dropbox make use of some form of file system api interaction to instantaneously keep track of changes that take place within a monitored folder.
As far as my understanding goes, however, this requires some daemon to be online at all times to wait for callbacks from the file system api. However, I can shut Dropbox down, update files and folders, and when I launch it again it still gets to know what the changes that I did to my folder were. How is this possible? Does it exhaustively search the whole tree in search for updates?
Short answer is YES.
Let's use Google Drive as an example, since its local database is not encrypted, and it's easy to see what's going on.
Basically it keeps a snapshot of the Google Drive folder.
You can browse the snapshot.db (typically under %USER%\AppData\Local\Google\Drive\user_default) using DB browser for SQLite.
Here's a sample from my computer:
You see that it tracks (among other stuff):
Last write time (looks like Unix time).
checksum.
Size - in bytes.
Whenever Google Drive starts up, it queries all the files and folders that are under your "Google Drive" folder (you can see that using Procmon)
Note that changes can also sync down from the server
There's also Change Journals, but I don't think that Dropbox or GDrive use it:
To avoid these disadvantages, the NTFS file system maintains an update sequence number (USN) change journal. When any change is made to a file or directory in a volume, the USN change journal for that volume is updated with a description of the change and the name of the file or directory.

Does adding a file change its modification time?

I am working on a website that reads out an FTP directory for files, and does something with them depending on their modification date. I do not have much experience with FTP so my question is if uploading files, pictures to be exact, changes their modification date to the time where they were uploaded?

Resources