Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips > Additional Libraries
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.


FilesEx library - returns file information


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-26-2008, 01:51 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,219
Awards Showcase
Forum Contributer 
Total Awards: 1
Default FilesEx library - returns file information

This small library lets you get the attributes and dates and times associated with a file or directory as both strings and numbers. It also lets you find all the directories or files within a directory. Help file included in zip. Should work on both desktop and device under .NET 1.0/1.1 and later.

If anyone can think of any more file and directory stuff that is not presently available in B4PPC then please post the suggestion here.

EDIT :- Version 1.1 with FileMove and FileRename added.

EDIT :- Version 1.2 with DirectoryCopy, DirectoryCopytree, DirectoryMoveTree and DirectoryRename added

EDIT :- Zip version 1.2a reposted with corrected Help file. The dll is unchanged.

EDIT :- Source code for dll merging posted. Put it in the Basic4ppc Desktop\Libraries folder.
Attached Files
File Type: zip FilesEx1.2a.zip (12.0 KB, 83 views)
File Type: zip FilesExSource1.2.zip (1.2 KB, 24 views)

Last edited by agraham : 05-28-2008 at 02:01 PM.
Reply With Quote
  #2 (permalink)  
Old 03-05-2008, 01:49 PM
Junior Member
 
Join Date: May 2007
Posts: 26
Default

Very useful work!,

Is there any possibility of change some characteristic of the file (I'm would like to change de name of the files, for example)?
Reply With Quote
  #3 (permalink)  
Old 03-05-2008, 03:35 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,219
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Version 1.1 posted with FileMove and FileRename added. In fact, somewhat surprisingly, there is no direct file rename ability available in .NET - it has to be done by moving a file - i.e copy and delete, so it could be done that way in B4PPC. However I have provided these two functions anyway!

FileRename is in fact a FileMove using the path of the original file as the path of the new file.
Reply With Quote
  #4 (permalink)  
Old 03-08-2008, 09:32 PM
Junior Member
 
Join Date: May 2007
Posts: 26
Smile

Thank you very much for your ideas, they are getting Basic4pp more and more interesting!
Reply With Quote
  #5 (permalink)  
Old 03-11-2008, 10:30 AM
Junior Member
 
Join Date: Nov 2007
Posts: 10
Default

This is awesome, just what I need. Thanks!
Reply With Quote
  #6 (permalink)  
Old 03-26-2008, 07:36 AM
Junior Member
 
Join Date: May 2007
Posts: 26
Default

any possibility of copy or move a directory with the subdirectories inside?

I use a lot Basic4 in the desktop version, but I miss some features of VB like "Dircopy"

Thanks in advance!
Reply With Quote
  #7 (permalink)  
Old 03-26-2008, 02:13 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,219
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

See first post for new version. I've tested it but use it at your own risk. DirectorytMoveTree may bend your head a little - it did mine! The top level item moved is NOT the directory, it is all the files in the directory and they must go into a new directory that didn't exist before. This new directory can be made in an existing directory. This behaviour is determined by .NET.
Reply With Quote
  #8 (permalink)  
Old 04-01-2008, 02:59 PM
Junior Member
 
Join Date: May 2007
Posts: 26
Smile

Thanks very much Agrahan, till I have proved, it works fine!
Reply With Quote
  #9 (permalink)  
Old 04-08-2008, 01:19 PM
Junior Member
 
Join Date: May 2007
Posts: 26
Question

Hi Agrahan, I've tried to use the "DirectoryTicksInfo" method as you explain in the help file, but this not appears as an option after the "FilesEx1."
I'm afraid it is too difficult for me to know if this is a bug or is something tha I have missed...
Thanks anyway!
Reply With Quote
  #10 (permalink)  
Old 04-08-2008, 01:34 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,219
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Originally Posted by francisco cobos View Post
I've tried to use the "DirectoryTicksInfo" method
Sorry, my fault. I renamed it but didn't correct the help. It is called DirectoryDoubleInfo and there is a counterpart for files, FileDoubleInfo. A corrected help file is now posted in a new zip in post #1 of this thread.
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wav file tone generation library. agraham Additional Libraries 0 05-21-2008 03:00 PM
How catch a selected treeview item information by mouse ? dan kabestan Questions & Help Needed 2 01-08-2008 06:30 PM
Reading com ports information from the registry Erel Code Samples & Tips 4 11-23-2007 01:09 PM
Save information drawn on a form maxtillberg Questions & Help Needed 10 11-07-2007 11:13 AM
How to set the Version Information in the exe file ? XerVision Questions & Help Needed 1 08-10-2007 07:01 AM


All times are GMT. The time now is 05:56 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0