This site is no longer active and is available for archival purposes only. Registration and login is disabled.

obtaining file size & date?


obtaining file size & date?

Postby RdR » Feb 3, 2007 @ 2:37am

RdR
pm Member
 
Posts: 5
Joined: Feb 3, 2007 @ 2:19am


Postby kornalius » Feb 4, 2007 @ 7:09pm

Hi,

There is a topic about obtaining the filesize on arianesoft.ca already:

func FileSize(filename$)
f$ = fopen(filename$, "r");
fseek(f$, 1, SEEK_END);
filesize$ = ftell(f$);
fclose(f$);
return (filesize$);
end;

With WIN32_FIND_DATA you can obtain the date and file size too:

struct(lpData$, WIN32_FIND_DATA);

handle$ = FindFirstFile("c:\\temp\\ *.*", &lpData$);
if(handle$ == INVALID_HANDLE_VALUE)
ShowMessage("No files found");
return(true);
end;

struct(UTC$, SYSTEMTIME);
struct(l$, SYSTEMTIME);

msg$ = "";
result$ = 1;
while(result$ > 0)
FileTimeToSystemTime(lpData.ftLastWriteTime$, &UTC$);
SystemTimeToTzSpecificLocalTime(NULL, UTC$, &l$);

msg$ = msg$ + lpData.cFilename$+" " + t.wMonth$ + "/" + l.wDay$ + "/" + l.wYear$ + " " + l.wHour$ + ":" + t.wMinute$ + "\n";

result$ = FindNextFile(handle$, & lpData$);
end;

FindClose(handle$);

ShowMessage(msg$);
Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby RdR » Feb 8, 2007 @ 7:45pm

RdR
pm Member
 
Posts: 5
Joined: Feb 3, 2007 @ 2:19am


Postby kornalius » Feb 9, 2007 @ 7:42pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby RdR » Feb 9, 2007 @ 11:38pm

RdR
pm Member
 
Posts: 5
Joined: Feb 3, 2007 @ 2:19am


Postby RdR » Feb 10, 2007 @ 12:16am

RdR
pm Member
 
Posts: 5
Joined: Feb 3, 2007 @ 2:19am


Postby kornalius » Feb 12, 2007 @ 5:47pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby RdR » Feb 13, 2007 @ 12:51pm

That worked!
Thanks for all your help.

BTW, I tried ordering the Pro version just now, but had a lot of trouble with esellerate. Kept asking for cookies for PayPal, but no matter what things I fiddled with on the browser and firewall -- it didn't want to work. Most annoying: I don't have that problem with other sites -- gave up in the end.

I'll try again some other day.

cheers,
RdR
RdR
pm Member
 
Posts: 5
Joined: Feb 3, 2007 @ 2:19am


Return to Pocket Programming Language (PPL)


Sort


Forum Description

Discuss this new development tool.

Moderator:

kornalius

Forum permissions

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 post attachments in this forum

cron