Open/Save Access to Folders

Caravelle

Active Member
Licensed User
Longtime User
Please bear with a beginner still trying to make sense out of the iPAQ filing system, as well as BASIC4PPC.

BASIC4PPC Open and Save dialogs will only address the Documents folder and "the storage card", according to the help, which says this is a limitation of the OS.

If I have both an SD card and a CF card plugged in at the same time, will the dialogs show both? (if so, help should refer to "card(s)" ).

I also have a special USB cable which allows USB pen-drives and other devices to be attached - they show up as "Hard Disk" under My Device in File Explorer.

Am I right in thinking that files can be opened & saved in any folder on the system, so long as the full path is stated? I conclude this because the help on the FileOpen command does not mention any limitation, nor does the help on DirCreate. If I take the help literally, then it seems that opening and saving locations are only limited in respect of the dialogs.

I particularly want to write an application which will transfer jpg files from a CF card to a USB pen-drive. When my camera CF cards are full half-way through a long holiday I will then be able to transfer the photos and re-use the cards. Or even just back up the images on the cards. I can't find any obvious way of doing this within the iPAQ filing system - no select & Move To dialog. I have my doubts that copy and paste would work on 4 gig of jpgs when available memory is a whole lot less :confused: So transferring one jpg at a time seems to be the way to go, but it would be extremely tedious to do it manually - I take a lot of photographs! I accept that the process would take a long time, but I can connect the power supply and leave it running overnight, along with the camera battery charger.

Eventually I would also like to import the jpg filenames and photo-dates into a database so that I can add details of subject and location, programatically allocate meaningful filenames based on these details and then rename all the files in one job, rather than selecting many thousands of jpg files one by one and renaming them manually - which is very prone to typing errors.

Thanks

Caravelle
 

agraham

Expert
Licensed User
Longtime User

Caravelle

Active Member
Licensed User
Longtime User
Excellent thank you, that FileDialogChanger looks like it will be useful, though for the application I described, if the BASIC4PPC file handling system itself can access any folder, anywhere, the folder names will be hard-coded and I won't need any dialogs. I strongly believe in not giving myself the option of filing something in the wrong place!

That just leaves the question of whether or nor the actual standard dialogs can cope with two cards fitted to the device, which is now just for interest. I can resolve it myself when the SD card I have ordered arrives!

I have had various PDAs over the years. I used to rather enjoy programming my Psions with the language supplied, but never got around to working out how to program my Palm. By then there were plenty of cheap if not free applications that did most of what I wanted. My next one was an iPAQ and my data work has been done with HanDBase, but I found it quite limiting. I was thinking of finding a programming language when that old iPAQ died, and now I have a replacement - iPAQ214 this time around - the extra bells, whistles, screen-size and connectivity just cry out to have some bespoke applications tailored to what I use the device for. My programming experience is mostly Delphi Pascal, with php/MySQL & SQLite being recent interests. Any variety of C just gives me a headache but BASIC4PPC is mercifully straightforward. I just need to get the flight plan sorted out before I can take off! :)

Caravelle
 

Zenerdiode

Active Member
Licensed User
That just leaves the question of whether or nor the actual standard dialogs can cope with two cards fitted to the device, which is now just for interest.

I have an hx4700 that has CF and SD(MMC) slots. In the file oped dialog, it displays the card symbol as an icon for the CF card, the SD or MMC card and for iPaqs Internal Storage. So I don't think you'll have any problems running the two cards together in the device at the same time.
 

Caravelle

Active Member
Licensed User
Longtime User
Thanks to ZenerDiode (would that be the 5.6 volt variety?). I knew that the iPAQ would work with both cards inserted as my old iPAQ did (HP2210 or something like that).

I have just written my first program on the device itself, and the good news is that the OpenDialog in BASIC4PPC will bring up files stored on CF card, SD card and the Hard Disk if these are fitted. So maybe the Help could be amended to make this clear in due course. I find it handy to click the header of the rightmost "Location" column, as this will then list the files in bunches according to where they are. Incidentally, there are no icons representing these locations, just the text. There are icons for filetypes only. Are you thinking of File Explorer, which does show icons?

In response to Ariel,
How do you plan to implement the allocation of meaningful filenames
the short answer is that the meaningful filename is made up of a combination of an incrementing number plus a short description of the subject. The same name will not re-occur in the same folder. Now here is the long answer...

It is based on a system I have used for labelling and paper-listing my photos for 48 years now, which translated itself very neatly to both the disk folder system, file naming conventions and electronic listing in a spreadsheet or database. Yes, I said 48 years - learning a new computer language does not come as easily to me now as it used to, so I hope forum members will be patient with me!

First, you have to bear in mind that the vast majority of the photos are of aircraft, and aircraft have what amounts to a unique identifier painted on them - the serial or registration. So allocating a phrase as the "subject" of the photo is a no-brainer, it's the registration number - I shall use "HB-JHC" as an example, since I mentioned that one in an earlier post (it's a Swissair Airbus A330). I used to take each 35mm film as an entity, and the photos would be given a sticky label and ID in the paper list as follows: 88-03-05 (HB-JHC). That means the fifth shot on the 3rd film taken in 1988. When translated to an electronic database it became a UID field of 880305 and a Subject field of HB-JHC. Since 2000 the year element has become YYYY rather than YY. When translated to the computer folder system it became file "05 (HB-JHC).jpg" in folder "03" of folder "1988". You will see that simple string manipulation enables one to create the two database fields from the filename, or vice versa.

With digital photography the film number is replaced by a session number - usually a visit to a particular location on a particular date - and the shot number has become three digits.

To assist me when looking through my folders for a particular set of photos I have found it helpful to re-name them Session + date + location, for example "My Pictures/2005/12 23-03-2005 San Francisco", but that is just cosmetic. However, the location can be created programatically from database entries including the location, while the date can come either from the database or direct from the jpg EXIF data (if there is no BASIC4PPC library for dealing with jpg metadata, hopefully someone is working on it).

So, we have:

Main folder: "2009"

Sub-folder: "06 09-09-2009 Heathrow"

Files:

"001 (HB-JHC).jpg
002 (4X-ELD).jpg
003 (HB-JHC).jpg
..."

Note how you can take more than one photo of the same subject and still have a unique filename. I have yet to go beyond 999 shots in a single day, I shall have to re-think if I ever do!

This system, or a simpler one, can be used for general photography, so long as the user can think of a reasonably short and meaningful word or phrase to enter into the database subject field - and of course it must not contain any "illegal" characters (these should be identified by error-checking at the time of data entry). I do occasionally take photographs of other subjects, like my grandchildren, and their names work fine as the "subject" field and as the bracketed part of the filename.

Turning to the database side of things, this can record further details such as the operator of the aircraft, the type, and various notes. Some information can be imported from links to other tables. If the UID in the database is constructed from the filepath (eg 200903036 without the text part in brackets) it becomes reasonably simple to open the jpg by clicking on the entry in the table, constructing the actual path and filename on the fly, and very easy to find the image manually - but that is all desktop stuff as far as I am concerned. The key role of the PPC in my scenario is to allow temporary storage of CF card images on another medium. The file-renaming during the transfer would be a bonus, but can't be done unless the subjects have been noted in the database first - there may not be time for that until I get home.

Another possible function of my application would be to tag the jpgs themselves with information from the database, so that metadata library wouldneed to read and write to the files.

I hope that explains everything. I need to get the basic file transfer program running by mid-November, for a two-week trip.

It has just struck me that the file-name allocation process could just as well be left until the images are transferred from the USB stick to my desktop (or actually to a 1 Tb USB drive attached to my desktop). It does not need to happen earlier. But either way, the logic will be just the same and it beats re-naming every jpg file one at a time manually.

Thanks for listening. Sorry the explanation was so long, but you did ask!

Caravelle.
 

Zenerdiode

Active Member
Licensed User
Incidentally, there are no icons representing these locations, just the text. There are icons for filetypes only. Are you thinking of File Explorer, which does show icons?

:sign0161: You see, that's what you get when you try to rush an answer out from memory, whilst being shouted at that your tea is on the table getting cold! :)

You're right, I was thinking of File Explorer...
 

Ariel_Z

Active Member
Licensed User
Thank you for your explanation. I have learnt a lot from it.
I was rather moved by the hugh amount of photography you must have gathered during this long time. I would also like to express my appreciation to your efforts when letting us know about the mistake in the help file (broken link) reported in a seperate thread.
One thing I didn't get yet - what is the method of placing the files themselves from your camera at the right place today? Do you do it manually? Do you rename them?
If I got it right you have been taking photographs of aircrafts since 1961 - you must have seen some very unique aircrafts...
 

Caravelle

Active Member
Licensed User
Longtime User
To answer ZenerDiode:

Have you seen this thread yet?
Extracting Exif Data

No, but I've only been playing with BASIC4PPC a few days! And like Homer Simpson, every new thing I learn pushes some old thing out. Thanks for the pointer.

And Ariel:

hugh amount of photography you must have gathered during this long time

Sadly, not so much in the old days, it was too expensive for me; and the old photos are not very good. The photos also present storage problems and the simple fact is that the more photos you have the less you look at them. It is better now that I have scanned all the old negatives and slides, it is much easier to view them on the screen. I also have many photos taken by other people, and with the wonderful world of the internet you can download as many good photos of interesting aircraft as you want for your own personal use. I even have a website showing photos taken by myself and others at London Gatwick Airport (I live 3 km from the airport). You might be interested to know that one of my favourite photos on the site is an Israeli Air Force Stratocruiser, taken here about 40 years ago. Now I am retired from work, I take "easyJet" day trips to places like Madrid and Toulouse and once a year I go with a group of other enthusiasts to some far-away places. Last year China and Japan. This year it will be Malaysia, Vietnam, Hong Kong, Macau and Thailand. There are not many people who enjoy a holiday where they hardly ever leave the airport!

If I got it right you have been taking photographs of aircrafts since 1961 - you must have seen some very unique aircrafts...

Yes indeed. Many old aircraft I have seen are now in museums. But most have been turned into coca cola cans! There is not much variety these days, the interest is more in the different airline markings. It is not an obsession. It is not an OBSESSION. It is NOT an obsession. It's just something I enjoy doing, though I could not really explain why.

what is the method of placing the files themselves from your camera at the right place today? Do you do it manually? Do you rename them?

I copy the CF cards to my I Tb USB HDD which is attached to my desktop PC, using a USB card-reader. I then use Paint Shop Pro to open the files one by one in sequence, edit the images if necessary, and then rename them. I then create the appropriate folders and move the right files into the right folders using Windows Explorer. As you can imagine, after returning home from a long holiday with 5,000 jpgs there is a lot to catch up on, and it can be weeks before I complete the job. When time permits I intend to create a Sqlite database-driven system on the desktop similar to the one I am proposing for the PDA - the table of new photos on the PDA would then simply be imported into the master table on the desktop. The current database on the Desktop is a dbf table programmed with Visual dBase a long time ago on Win 3.1, and very outdated. It is not vital to me to rename the files on the USB disk, but it would be very useful to complete the database details on the PDA either just after the photo is taken - if there is time - or after dark or while travelling. Anything that reduces the amount of work after I get home is a good idea

Best wishes

Caravelle
 

Ariel_Z

Active Member
Licensed User
First - I apologize about the typo - I meant huge amount rather that hugh...

What I really thought is that so many photographs must take a very long time to arrange. I guess some parts of the work must be done manually, but there might be a way like you said - to be able to add partial details while on the field. I guess you should start off with the features you have described but you can certainly add many usefull features - two that come to mind are the ability to add some recorded notes to every photo - about 10 seconds - so it does not take time when taken but you can still remember it later, and the ability to create a "batch" of the "in-desktop-arrangement-process" you described: open the program, choose a directory, and have the system open all photographs in sequence, allowing you to rename them, sending them to the right place according to the name/a preset you change once every couple of photos/ date taken, and allowing you - by a keyboard shortcut or a convenient button, to open them in Paint Shop Pro. But these are just too early thoughts better kept for the future.

Regards,
Ariel
 

Caravelle

Active Member
Licensed User
Longtime User
Ariel wrote:

these are just too early thoughts better kept for the future
.

Yes indeed. Often the best ideas turn out to be totally impractical, and the right path only becomes clear after several wrong paths have been taken :)

I hadn't thought of the recorded notes option, that could be useful to also record aircraft seen but not photographed. Sometimes they are too far away, or even too close. And at some airports photography is not officially permitted. I shall have to see how practical it all is, it would certainly be easier than extracting the stylus from the device, typing something in and putting the stylus back every time something is to be noted - the recording control icons are just about big enough to operate with fingernails alone, and it it may also be possible to program the shortcut buttons at the bottom of the device to start and stop recordings. Sooner or later I would drop and probably lose the stylus in my hurry to take another photograph. That has certainly happened using paper notebook and pen. I also need to see how much work the iPAQ214 will do before the battery runs out.

Many thanks for the ideas.

Caravelle
 
Top