Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to update the last write time for a symbolic link in Windows? I can use the following powershell command to update the last write time of a directory, but it doesn't work for a symbolic link:

(ls -filter foo).LastWriteTime=Get-Date
share|improve this question
add comment

1 Answer

Attempting to set the properties of the symlink will actually the properties of the actual file that it points to. If you look at the file that foo points to, you'll see that the LastWriteTime is being updated with the current date.

The only way I know of to update the last write time of the actual symlink is to simply overwrite the symlink with a new one.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.