The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
50g: copy all stored objects to SD card individually
10-13-2016, 07:55 PM
Post: #1
50g: copy all stored objects to SD card individually
A user on the HP Support Forums (andy11) posted a question not long ago about
merging the contents of several 50g systems that he owns. The inevitable
discussion ensued, with the final suggestion being to simply copy the needed
objects to his SD card, then merging as needed for redistribution to the various
50g units.

Most users know that you can easily ARCHIVE the 50g HOME contents to the SD
card, but that puts everything into a single file on the card. Automating the
copying of individual calc-based objects to the SD card seemed like a useful
feature to me, so I decided to give it a shot. I've managed to put together a
working prototype of a library that copies all non-hidden objects in HOME
(including subdirectories) to the SD card, placing each object in corresponding
SD directories to their locations on the calculator.

I knew there'd be some file system and character set limitations that I'd run
into, and I was able to mitigate the more obvious ones with reasonable success
-- at least for my particular setup. The 50g SD card implementation seems to be
OK with some extended features. I'm wondering how these accommodations will
translate to other platforms, though.

Here's some of the issues that I've run into and how I've handled them so far:

Case Sensitivity

The calculator is case-sensitive regarding names, but the SD card file system
isn't. As such, it's possible to have multiple objects on the calculator in the
same directory that would not be allowed on the SD card (eg. "MyObj", "myobj",
"MYobj", etc.). If copying the object to the SD card generates a name conflict,
a suffix is added (starts with "2", then goes up to "20" before giving up).

Character Set

The 50g character set includes many valid symbols for object names that would
not be suitable for the file system of the SD card. I've used a simplistic
approach for this; all characters including A-Z, a-z, 0-9, and "." are left
intact. Any other characters in an object name get converted to "$xx", where
"xx" is the hex code for the character.

Object Name Length

This one surprised me. I originally thought that the 50g SD card file system
wouldn't accept long-ish file names, but it seems to be OK with them. At least
up to my test case of 27 characters. I haven't tried longer ones yet.

At present, both my 50g and my Win7x64 system are able to see and access each
stored object on the SD card in this manner. I'm wondering, though, if there are
more strict requirements on other platforms that might access the SD card
contents. Are long/mixed-case file names acceptable for 50g SD cards on
Mac/Linux/other systems? Are there other problems not handled by the above
methods?

The library is a work-in-progress, so I'd rather not post it just yet. But if
you're interested in trying it out, send me a PM with your email address and
I'll send it along. In the meantime, I'd appreciate any thoughts you may have
regarding pitfalls or better approaches to the above.

- David
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
50g: copy all stored objects to SD card individually - DavidM - 10-13-2016 07:55 PM



User(s) browsing this thread: 3 Guest(s)