|
Need help with .CreationTime Why is it that when I uncomment the "start-sleep" line in the below script, I
get the correct value returned for my creationtime--but when I comment it
out, I do not get the correct creationtime for the file? This is driving me
nuts! If this seems to work for you the first time you run it, wait a minute
and run it again.
"test1" > c:\test.txt
(gci c:\test.txt).creationtime
del c:\test.txt
### You'll get an error when the command below runs b/c the file doesn't
exist.
(gci c:\test.txt).creationtime
#start-sleep 30
new-item -path c:\test.txt -type "file"
(gci c:\test.txt).creationtime
--
BatchMan |