BigEddieM37 Posted August 23, 2008 Report Share Posted August 23, 2008 I have a requirement where I need to specifically modify the DATE and TIME of a group of a few dozen or so MS-Windows files which are programatically copied by a LV 8.5 utility into a selected destination folder. I have to modify the date and time of ALL the copied files to be the same date and time whether that be the current date and time or a selected date and time. (There's an application specific reason) There doesn't seem to be any file function in LV 8.5 that will allow me to accomplish this. I've tried copyping, renaming and moving with no success. The original windows file timestamp remains unchanged no matter what I do with the file. The only related (sort of) mention of this that I found on the NI website is a utility that someone wrote called GetFileCreationDate.vi (http://digital.ni.com/public.nsf/allkb/0A2...625727C000CFA7B) which actually does the opposite of what I need to do. I need to SetFileCreationDate. Does anyone know of an easy way for me to accomplish what I've described? Of does someone already have a utility called SetFileCreationDate.vi that does this? Unfortunatley I'm not a C programmer, so searching the MSDN vaults for a solution can be a bit challenging. Comments or suggestions appreciated. Thanks. Ed Quote Link to comment
bmoyer Posted August 23, 2008 Report Share Posted August 23, 2008 The OpenG utilities will do this (www.openg.org). There's a VI call File Info__ogtk.vi that allows modification of all kinds of file parameters. A description is at: http://wiki.openg.org/File_Info Quote Link to comment
Dan DeFriese Posted August 23, 2008 Report Share Posted August 23, 2008 There is a windows API function called SetFileTime(). Maybe you can look into creating call library node for this. http://msdn.microsoft.com/en-us/library/ms724933(VS.85).aspx ~Dan DeFriese Quote Link to comment
AnalogKid2DigitalMan Posted August 23, 2008 Report Share Posted August 23, 2008 To reset files to current date/time you can use a get file size followed with a set file size (wire the size in bytes together), if that helps any. Quote Link to comment
BigEddieM37 Posted August 27, 2008 Author Report Share Posted August 27, 2008 Good suggestions. Will investigate usage of the OpenG utilities as well as the Windows API call. Thanks for the inputs. Eddie Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.