WMIC alter/update DATAFILE's LastModified RRS feed

  • Question

  • Hello,

    I'm currently trying to alter a file's lastmodified date through WMIC,

    To fetch the date i'm using : WMIC DATAFILE WHERE Name='c:\\test\\whatever.txt' get LastModified

    I've then tried to update the LastModified with WMIC DATAFILE WHERE Name='c:\\!\\c.html' set LastModified='20110304153324.294128+060' which results in the error "Provider is not capable of the attempted operation".

    I've also tried to alter any of the other date-properties/attributes on the DATAFILE without success, i'm trying to accomplish a mechanism where i can easily check if a file already exist on the remote machine or not.. and filename isn't really enough :)

    Monday, March 7, 2011 9:07 AM