SaveData into subfolder
afischer
I was wondering if it is possible to store/backup a part of an experiment somewhere else. SaveData was promising but I faced some problems.
LoadData /Q/O=2 /R /S="SubFolder1:SubFolder2:Subfolder3:" targetFile
can load Data from subfolders within another file. But SaveData /O/R /T=$"Subfolder1:Subfolder2" targetFile
does not work. It seems that in case of SaveData you can only generate one subfolder (SaveData /O/R /T=$"Subfolder1" targetFile
). Unfortunately the folder hierachy of the source and target files might be different and therefore it is not possible to save and restore the full hierachy.Is someone aware of any workaround here?
Alex
SaveData saves the current data folder and, if you use /R, any sub-data folders. The /J flag allows you to specify the simple names (not paths) of objects in the current data folder to be saved instead of saving all objects.
If your hierarchy looks like this:
DFA
DFB
DFC
September 25, 2014 at 05:58 am - Permalink
Still I have some questions concerning some of your statements.
The documentation concerning /T[=topLevelName] says:
And infact the standard top-level data folder is not just renamed, but an additional enclosing data folder is generated
Unfortunately you cannote filter by folders names (only variable, string or wave names). Thus, with /J every subfolder will be generated (no matter if it fits to the /J filter) and afterwards only the content of each folder is filtered with respect to /J. In my case all subfolders contain the same variable names and therfore all subfolders with content will be saved. If there is a "trick" to use the /J flag to filter folders would be perfect. If there are more ideas I would be happy. If not I'll go for the "copy folder, SaveData, killDataFolder" suggestion of hrodstein. Alex
September 25, 2014 at 07:01 am - Permalink
I was afraid of that.
There are no tricks. I think you'll have to use the MoveDataFolder or CopyDataFolder technique.
September 25, 2014 at 10:36 am - Permalink