OpenFileRequester Question
OpenFileRequester Question
When using OpenFileRequester() it displays the file names only. Is there a way to also show the file date? I may have backup files with different dates and I want to be able to load the proper file.
http://www.oldtimeradiotoday.com - Listen to or download classic old time radio broadcasts.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: OpenFileRequester Question
That's a good question. The File Requester pops-up a form similar in type to Windows Explorer (on MS Windows) and the details displayed are as previously set by the User - so the developer doesn't know what info, apart from the filenames, the User sees. However the User can change what is seen within form, via options. Selecting "Details" or "Content" does at least show Date Modified.
Everyone is different. I always postfix the date to the filename on backup, and backups are on a separate physical drive.
If the program you are writing needs to handle the backup of files it processes, then you could use a prefix or postfix system to record their state.
Perhaps someone else knows how to reveal the file date and display in a DIY File Requester? Might need some API?
Everyone is different. I always postfix the date to the filename on backup, and backups are on a separate physical drive.
If the program you are writing needs to handle the backup of files it processes, then you could use a prefix or postfix system to record their state.
Perhaps someone else knows how to reveal the file date and display in a DIY File Requester? Might need some API?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: OpenFileRequester Question
Postfixing the date to the filename on backup is what I was trying to do. When creating the backup file, if I use:
it saves the file with no errors but if I use:
I get a "Error creating file."
Code: Select all
destinationFile.s = destinationPath + "MyFile.bak"
Code: Select all
destinationFile.s = destinationPath + "MyFile.bak" + FormatDate("%mm/%dd/%yyyy", Date())
http://www.oldtimeradiotoday.com - Listen to or download classic old time radio broadcasts.
Re: OpenFileRequester Question
Not allowed characters in a file name: \ / : * ? " < > |
FormatDate("%mm-%dd-%yyyy", Date()) should work.
FormatDate("%mm-%dd-%yyyy", Date()) should work.
Hygge
Re: OpenFileRequester Question
Try this, it might help...
GetFileDate()
GetFileDate()
Re: OpenFileRequester Question
Thanks Kiffi. That works perfectly!
Thanks Tenaja but the problem with GetFileDate() is that it gives you an unformatted date. For example, April 6, 2020 is retrieved as 1584537458.
Thanks again to both.
Thanks Tenaja but the problem with GetFileDate() is that it gives you an unformatted date. For example, April 6, 2020 is retrieved as 1584537458.
Thanks again to both.
http://www.oldtimeradiotoday.com - Listen to or download classic old time radio broadcasts.
Re: OpenFileRequester Question
Columbo wrote:For example, April 6, 2020 is retrieved as 1584537458.
Code: Select all
String$ = FormatDate("%dd.%mm.%yy - %hh:%ii", 1584537458)