- Q Mention the family, order of Parasitic catfish Fish?
- Q Color curve attribute is only available for spot light?
- Q Mention what is data leakage? What are the factors that can cause data leakage?
- Q Which part of the Earth’s surface receives the highest amount of insolation?
- Q Which is your favorite subject?
- Q Which of the following is the correct syntax for calling the namespace constructor as a function in e4x?
- Q Which GWT widget represents a panel that formats its child widgets using the default HTML layout behavior
- Q Hockey match, fill in the blanks type team No. of matches won lost draw goals( favour) goals( against0 A 2 2 0 0 7 1 B 2 0 1 1 2 4 C 2 0 1 1 3 7
- Q What is gpa log book?
- Q What makes up django architecture?
- Q How many chromosomes does a human cell contain?
Question
How do I change the modified time of a file?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Answers
Unfortunately, this can't be done through ASP. The dateLastModified property of the FileSystemObject is read-only.
However, if it's a text-based file, you could read in the contents of the file, delete the file, and re-create it. That
would alter the create *and* modify time of the file, and might not be the desired result. Here is the code to do
this in VBScript:
<%
Sub Touch(filename)
set fso = Server.CreateObject("Scripting.FileSystemObject")
set fs = fso.openTextFile filename,1,true
f = fs.readAll()
fs.close: set fs = nothing
fso.deleteFile filename,true
set fs = fso.createTextFile filename,true
fs.writeline(f)
fs.close: set fs = nothing
set fso = nothing
End Sub
Call Touch(Server.MapPath("/somefile.htm"))
Call Touch("c:somefile.txt")
%>
Another alternative is to use touch.exe, which you can get from the NT or Windows 2000 Resource Kit.
Your Comment
However, if it's a text-based file, you could read in the contents of the file, delete the file, and re-create it. That
would alter the create *and* modify time of the file, and might not be the desired result. Here is the code to do
this in VBScript:
<%
Sub Touch(filename)
set fso = Server.CreateObject("Scripting.FileSystemObject")
set fs = fso.openTextFile filename,1,true
f = fs.readAll()
fs.close: set fs = nothing
fso.deleteFile filename,true
set fs = fso.createTextFile filename,true
fs.writeline(f)
fs.close: set fs = nothing
set fso = nothing
End Sub
Call Touch(Server.MapPath("/somefile.htm"))
Call Touch("c:somefile.txt")
%>
Another alternative is to use touch.exe, which you can get from the NT or Windows 2000 Resource Kit.
Your Comment
- 0
- 0
- New Answer
- Contributors: *,
More Software Questions..
What is the inputsplit in map reduce software?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is software configuration management?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What Is Java Api For Xml-based Rpc (jax-rpc)?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How can you implement fine-grained auditing?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is IBM’s simple explanation for Big Data’s four critical features?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is static synchronized method in JDBC API? Give an example?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What does the NULLIF function do?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What happens if a start method is not invoked and the run method is directly invoked?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Should we override finalize method
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
what is the difference between mysql_fetch_array and mysql_fetch_object?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How will XML affect my document links?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Why to use Style Sheets?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What are Filters in MVC?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Can you explain Application layer in OSI model?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How to define new testplan attributes?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Which oracle package is used to manage the oracle lock management services?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is marker interface?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What types of partitioning are there for BW?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,