Posted on 1999-11-14
Medium Priority
Last Modified: 2010-05-02
I need a way to change the file modified date in VB6 even if no changes happen to the file Myfile.txt
Question by:abidsml
LVL 32

Accepted Solution

Erick37 earned 120 total points
ID: 2207049
"Obtaining and Changing a File's Created, Accessed and Modified Dates"


Expert Comment

ID: 2207059
Or try a less engineering way.
If it is really a .TXT file try adding a single space at the end and save it. Open it again, eat the space you've just added and save it again.
LVL 12

Expert Comment

ID: 2207942
I think if you just open the file for append and then close it the date will be changed even if no data is added.

FileID = Freefile
OPEN "Myfile" for append as #FileID
Close #FileID

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.


Expert Comment

ID: 2208292
mark, when i do that and check the file properties, the modified date is still the same ??
LVL 12

Expert Comment

ID: 2208376
Then use planask's idea. I didn't test it, but depending on the OS the date can change. A file on a Novell server will show an update.


Author Comment

ID: 2209386
the programme you suggested is too complicated to follow but i learned things from it and solved my problem.

thanks all.  

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As a person who answers a lot of questions, I often see code that could be simplified, made easier to read, and perhaps most importantly made easier to maintain if the code was modified to use the Select Case statement. This article explains how to…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

597 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