Jump to content

Cannot change "Last Modified Time"


Recommended Posts

I'm unable to change the "Last Modified Time" on folders on unRAID.  I have a PowerShell script that I want to run, but I discovered that I cannot change the last modified time on some folders.  I think I have figured out that I cannot change the last modified time or creation date to before the folder was actually created on unRAID.

 

Ive tried with powershell and a couple other utilities.

 

Everything works just fine if I'm working with folders on a Windows Server.

 

In its simplest form, here is a script to change a date in PowerShell:


PS D:\scripts> $folder = get-item '\\nas\TV\Breaking Bad'
PS D:\scripts> $folder.LastWriteTime          <<<<------- Displays current time

Monday, September 30, 2013 8:13:35 AM


PS D:\scripts> $folder.LastWriteTime = "10/01/2007"          <<<<------- Sets the time you want
PS D:\scripts> $folder.LastWriteTime          <<<<------- Displays current time (see, it didnt change to the date I wanted)

Sunday, September 15, 2013 11:53:02 PM

 

 

Any ideas?  Thanks.

Link to comment

Well, I tried that and it didnt work.  I tried adding the following lines to both smb.conf and smb-extra.conf (separately, of course) and neither one worked.

 

    dos filemode = yes

    dos filetime resolution = yes

    dos filetimes = yes

    fake directory create times = yes

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...