|
-
Feb 13th, 2008, 08:50 AM
#1
Thread Starter
Addicted Member
[2008] How to rename a file without touching its timestamp?
Hello,
How can I rename a file without changing its timestamp(s)? You know all files have the last access on and so on and I would like to rename file without touching it.
-
Feb 13th, 2008, 08:57 AM
#2
Re: [2008] How to rename a file without touching its timestamp?
-
Feb 13th, 2008, 09:27 AM
#3
Thread Starter
Addicted Member
Re: [2008] How to rename a file without touching its timestamp?
There must be an option since I can manually rename files in Windows without changing any timestamps.
-
Feb 13th, 2008, 10:44 AM
#4
Re: [2008] How to rename a file without touching its timestamp?
 Originally Posted by kaisellgren
There must be an option since I can manually rename files in Windows without changing any timestamps.
Are you sure on this?... Whenever you access a file, the Date Accessed attribute is updated.... And to rename a file, you must access it... You can see this by select a folder in Windows Explorer, change the view to details and customize your detail view to include the Date Accessed field. Now just pick any file and note the date accessed on it... Wait a few minutes and rename that file... Refresh the screen (by go to another folder then back) and bang... the date accessed field now is updated with the new value.
-
Feb 13th, 2008, 10:51 AM
#5
Thread Starter
Addicted Member
Re: [2008] How to rename a file without touching its timestamp?
Yes. Date created, accessed and modified remained the same after renaming files manually.
-
Feb 13th, 2008, 11:05 AM
#6
Re: [2008] How to rename a file without touching its timestamp?
 Originally Posted by kaisellgren
Yes. Date created, accessed and modified remained the same after renaming files manually.
Did you refresh the screen after renaming a file?
-
Feb 13th, 2008, 11:13 AM
#7
Re: [2008] How to rename a file without touching its timestamp?
 Originally Posted by kaisellgren
Yes. Date created, accessed and modified remained the same after renaming files manually.
I just tried it out and the Date Accessed field changed after a rename, even if I didn't refresh the screen.
-
Feb 13th, 2008, 11:23 AM
#8
Re: [2008] How to rename a file without touching its timestamp?
-
Feb 13th, 2008, 05:43 PM
#9
Re: [2008] How to rename a file without touching its timestamp?
When you System.IO.File.Move() (to rename), you should still have the same create and modified date on it. If you don't, and it shouldn't come to this, you can still use the System.Io.File.SetCreationTime()/SetLastAccessTime()/etc() methods. Incidentally, a lot of the major world religions wouldn't be so disparate if the .NET framework had existed back then, as we'd all have one SetCreationTime() and no arguments.
-
Feb 13th, 2008, 08:13 PM
#10
Re: [2008] How to rename a file without touching its timestamp?
 Originally Posted by mendhak
Incidentally, a lot of the major world religions wouldn't be so disparate if the .NET framework had existed back then, as we'd all have one SetCreationTime() and no arguments.
I just reported this post and they think they will impose a 10 day ban.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|