?
Solved

How do I change a file's Last Modified Date?

Posted on 2003-03-21
11
Medium Priority
?
239 Views
Last Modified: 2008-03-03
I would like to be able the change to the date and time of a particular file's "last modified" date and timestamp using ASP. Is this possible with the FileSystemObject?

Thanks,
-Greg
0
Comment
Question by:greddin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +4
11 Comments
 
LVL 15

Expert Comment

by:gladxml
ID: 8185034
greddin,

Below is the link of whta FSO can do...

http://www.15seconds.com/component/pg000847.htm

I think that it is not possible...

0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 8185048
It depends on the file. You might be able to use ASP to open and modify the file, and then as a result, the last modified date would change.

Why would you want to do that?

Fritz the Blank
0
 
LVL 15

Expert Comment

by:gladxml
ID: 8185071
greddin,

BTW why do you want to change the date and time of a particular file's "last modified" date?

Regards,
gladxml
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:gladxml
ID: 8185097
greddin,

Related links regarding FSO.

http://www.juicystudio.com/tutorial/asp/files.html#text

As I had said you can only read the modofied time and cannot be edited unless you save the file just like fritz said.

Happy programming...
0
 
LVL 4

Expert Comment

by:Wakie
ID: 8185307
Listening..
0
 
LVL 7

Expert Comment

by:lavinder
ID: 8185319
Hi

 All the above comments by the experts are correct. In ASP, i also think it is not possible only through FSO. But if you really need this functionality, try the code in following link:
http://www.freevbcode.com/ShowCode.Asp?ID=1335
 ...paste it and create an activex dll and call it using asp.
 
 feel free to post your problems in implementation of this.

cheers!!
0
 
LVL 28

Accepted Solution

by:
sybe earned 2000 total points
ID: 8185594
http://www.alphasierrapapa.com/IisDev/Components/AspTouch/

++++++++++++++++
If you are an "old dog" in the computer business, then you definitely remember the touch utilities that were around to give a file a certain date and time stamp - with a common application being setting a common date for all files of a project before it was deployed to a client. Because I didn't save the old utilities in a secure spot, I had to come up with a new solution: a component that does it for me.

The advantage of the component approach is that I can use it in a WSH script to touch multiple files, or use it from within ASP to change the timestamp of certain files. Just in case you wonder what I use it for: I have an online email archive (file based) that is searchable with Index Server, and the date selection is done via the "touched" file date of the messages (the file time is the same as the email time was).

++++++++++++++++
0
 
LVL 34

Expert Comment

by:arbert
ID: 8186809
Are these text files or binary files?  If they are text files, you could use the FSO to alter the date by performing a write to the file.  However, if they are binary, FSO doesn't support binary file writing.....

Brett
0
 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 8187053
I was thinking not only FSO--which would be best--but also as a last result, office scripting.

Fritz the Blank
0
 
LVL 34

Expert Comment

by:arbert
ID: 8187065
greddin, if you give us a little better idea of what you're trying to do, we might be able to offer you a better solution.

Brett
0
 

Author Comment

by:greddin
ID: 8187078
Thanks sybe. This works perfect.

-Greg
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question