forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Get or Set File/Folder Date/Time in NT/2k/XP

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units
View previous topic :: View next topic  
Author Message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Tue Aug 26, 2003 4:50 am    Post subject: Get or Set File/Folder Date/Time in NT/2k/XP Reply with quote

Set File/Folder Date/Time in NT/2k/XP
========================
This is a example showing how to get information and change file and folder date time. Said to be a little more difficult on NT based operating systems this example does that using API.
Please note that this example as such doesn't work on win 9x.

Get the package with examples from here:
http://codescript.vdsworld.com/VDS5src/Set_date_time-XP.zip

If you don't want to deal with directories then use the built in VDS commands:
@FILE(<file description>, T)
and
FILE SETDATE, <file path>, <time>, <date>

However it may not set all the 3 attributes seperately.

Here are the commands and functions available in this DSU :

Get File/Folder Date time Info:
=========================
Code:
%A= @FILEINFO(GET,CREATED,%F)

%A= @FILEINFO(GET,MODIFIED,%F)

%A= @FILEINFO(GET,ACCESSED,%F)

where %F is the path of the file or directory to obtain info.


Set the File File/Folder Date time Info:
========================================

Code:
FILEINFO SET,CREATED,%F,Date,Month,year,hour,min,sec

FILEINFO SET,MODIFIED,%F,Date,Month,year,hour,min,sec

FILEINFO SET,ACCESSED,%F,Date,Month,year,hour,min,sec

where %F is the path of the file or directory to be modified.


Win 9x version may be easier but I never tried one for it. Because I am not currently using it. Sorry.

Disclaimer:
===========
The unit uses windows API. Use at your own risk.


Enjoy.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Sanjuro
Contributor
Contributor


Joined: 01 May 2003
Posts: 59
Location: Norfolk-United Kingdom

PostPosted: Tue Aug 26, 2003 8:25 am    Post subject: Reply with quote

Thanks for this codescript! Very Happy


I have been trying to figure this one out myself. I guess you saw my plea for help in the general section? If not, then thanks anyway!

Sure am glad that your absence from the forum was a short one! Very Happy

Cheers
Sanjuro

_________________
"Apparently three out of four people make up 75 percent of the population. Smile
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Units All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group