SaveData into subfolder

Hi there,
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
Your use of /T in SaveData is wrong. It just sets the name of the top-level data folder in the output file. Reread the documentation for /T.

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:
root
    DFA
    DFB
    DFC
then I think SaveData/J="DFB;DFC;" would save the last two sub-data folders only. But I have not tested this. If that is not sufficient then another solution is to create a new data folder, copy the data folders you want to save into the new data folder, and use SaveData/R on the new data folder. Then kill it using KillDataFolder. If the data is large you could move the data folders using MoveDataFolder into the new data folder instead of copying and move them back after saving.
Thanks hrodstein. I guess the "copy folder, SaveData, killDataFolder" workaround might be the best solution (although it sounds a bit laborious).

Still I have some questions concerning some of your statements.

hrodstein wrote:
Your use of /T in SaveData is wrong. It just sets the name of the top-level data folder in the output file. Reread the documentation for /T.


The documentation concerning /T[=topLevelName] says:

Quote:
Creates an enclosing data folder in the target with the specified name, topLevelName, and writes the data to the new data folder.

And infact the standard top-level data folder is not just renamed, but an additional enclosing data folder is generated


hrodstein wrote:
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:
root
    DFA
    DFB
    DFC
then I think SaveData/J="DFB;DFC;" would save the last two sub-data folders only. But I have not tested this.
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
Quote:

Unfortunately you cannote filter by folders names (only variable, string or wave names).


I was afraid of that.

Quote:

If there is a "trick" to use the /J flag to filter folders would be perfect.


There are no tricks. I think you'll have to use the MoveDataFolder or CopyDataFolder technique.