Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Any chance to get the file creation/modification date?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-26-2008, 08:49 AM
Newbie
 
Join Date: Feb 2008
Posts: 6
Default Any chance to get the file creation/modification date?

Is there any DLL to get the date/time a file was created/modified?I have to compare wich one is the newer file.
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 10:03 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Have a play with this. See if it does what you need?

EDIT :- the dates and times are a string. In case it is not obvious get the ticks value by :-
Code:
  Dim dt(2' in globals

  ...

  DateFormat = 
"dd/mm/yyyy" ' for those of us for whom the defaults fail
  TimeFormat = "hh:mm:ss"
  dt() = StrSplit(info(
4)," ")
  d = DateParse(dt(
0)) + TimeParse(dt(1)) Mod cTicksperday
  
'  "mod" because the current date is included by TimeParse
Attached Files
File Type: zip FilesEx1.0.zip (2.2 KB, 33 views)

Last edited by agraham : 02-26-2008 at 10:49 AM.
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 02:14 PM
Newbie
 
Join Date: Feb 2008
Posts: 6
Default

WOW, thats GREAT!

Exactly what i need!

Easy, small but powerfull!

Thanks!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 02:33 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

For registered users I have posted an expanded version together with a help file in the "Additional libraries" forum.
Reply With Quote
  #5 (permalink)  
Old 03-06-2008, 07:04 AM
Newbie
 
Join Date: Feb 2008
Posts: 6
Default

I just tried to read the file info of the program that is running to have an auto version number by this.
But i always get an unsupported error-message.

Is there no chance to read the file info of the program that uses this .dll?

It would be great if this would be possible.


Sub Globals
Dim info(5)
End Sub

Sub App_Start
Form1.Show
FilesEx1.New1
info() = FilesEx1.FileInfo("DateTest.exe")
Label1.Text = "Version " & SubString(info(2),6,4)-2007 &"."& Int(SubString(info(2),3,2))&"."& Int(SubString(info(2),0,2))
End Sub


The program is called DateTest.exe, so it has to read its own info.

Last edited by Christian72DD : 03-06-2008 at 07:15 AM.
Reply With Quote
  #6 (permalink)  
Old 03-06-2008, 08:15 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Christian72DD View Post
Is there no chance to read the file info of the program that uses this .dll?
There is no problem in doing this.

If it is not finding the file try

info() = FilesEx1.FileInfo(AppPath & "\DateTest.exe")

If that still doesn't work check the actual strings returned with a msgbox() before trying to build your version string to check the formatting. The strings may be differently formatted between device and desktop.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error During Program modification mozaharul Questions (Windows Mobile) 2 07-24-2008 06:38 AM
C# Custom control creation Cableguy Questions (Windows Mobile) 2 05-19-2008 01:04 PM
Experience with creation of HELP files HARRY Questions (Windows Mobile) 3 02-27-2008 01:58 PM
Speed of dynamic control creation willisgt Questions (Windows Mobile) 4 12-05-2007 01:52 PM
How to get saved date and time value or other properties of a file? Rioven Questions (Windows Mobile) 1 08-30-2007 06:10 AM


All times are GMT. The time now is 08:48 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0