diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/cli/CommandPut.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/cli/CommandPut.java
index 632fe501d63bbe7a6e8a33249f3ab73646e484ac..0f97b94a6f98befa00f87c8a124b2a6fadda807a 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/cli/CommandPut.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/cli/CommandPut.java
@@ -17,9 +17,10 @@
 package ch.systemsx.cisd.openbis.dss.client.api.cli;
 
 import java.io.File;
-import java.io.InputStream;
+import java.io.IOException;
 import java.io.PrintStream;
 import java.util.ArrayList;
+import java.util.List;
 
 import ch.systemsx.cisd.args4j.CmdLineParser;
 import ch.systemsx.cisd.args4j.ExampleMode;
@@ -27,7 +28,8 @@ import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
 import ch.systemsx.cisd.common.exceptions.UserFailureException;
 import ch.systemsx.cisd.common.io.ConcatenatedFileInputStream;
 import ch.systemsx.cisd.openbis.dss.client.api.v1.IDssComponent;
-import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric;
+import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.FileInfoDssBuilder;
+import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.FileInfoDssDTO;
 import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO;
 
 /**
@@ -66,35 +68,62 @@ class CommandPut extends AbstractCommand
     {
         private final CommandPutArguments arguments;
 
-        private final IDssServiceRpcGeneric dssService;
+        private final IDssComponent component;
 
-        CommandPutExecutor(IDssServiceRpcGeneric dssService, CommandPutArguments arguments)
+        CommandPutExecutor(IDssComponent dssService, CommandPutArguments arguments)
         {
             this.arguments = arguments;
-            this.dssService = dssService;
+            this.component = dssService;
         }
 
         int execute()
         {
-            NewDataSetDTO newDataSet = getNewDataSet();
-            dssService.putDataSet("", newDataSet);
+            try
+            {
+                NewDataSetDTO newDataSet = getNewDataSet();
+                if (newDataSet.getFileInfos().isEmpty())
+                {
+                    System.err.println("Data set file does not exist");
+                    return -1;
+                }
+                ConcatenatedFileInputStream fileInputStream =
+                        new ConcatenatedFileInputStream(true, getFilesForFileInfos(newDataSet
+                                .getFileInfos()));
+                component.putDataSet(newDataSet, fileInputStream);
+            } catch (IOException e)
+            {
+                e.printStackTrace();
+                return -1;
+            }
 
             return 0;
         }
 
-        private NewDataSetDTO getNewDataSet()
+        private NewDataSetDTO getNewDataSet() throws IOException
         {
             String storageProcessName = arguments.getStorageProcess();
             String filePath = arguments.getFilePath();
-            InputStream fileInputStream =
-                    new ConcatenatedFileInputStream(true, getFilesFromPath(filePath));
-            return new NewDataSetDTO(storageProcessName, filePath, fileInputStream);
+            ArrayList<FileInfoDssDTO> fileInfos = getFileInfosForPath(filePath);
+            return new NewDataSetDTO(storageProcessName, fileInfos);
         }
 
-        private ArrayList<File> getFilesFromPath(String path)
+        private ArrayList<FileInfoDssDTO> getFileInfosForPath(String path) throws IOException
+        {
+            ArrayList<FileInfoDssDTO> fileInfos = new ArrayList<FileInfoDssDTO>();
+            File file = new File(path);
+            if (false == file.exists())
+            {
+                return fileInfos;
+            }
+            FileInfoDssBuilder builder = new FileInfoDssBuilder(path, path);
+            builder.appendFileInfosForFile(file, fileInfos, true);
+            return fileInfos;
+        }
+
+        private ArrayList<File> getFilesForFileInfos(List<FileInfoDssDTO> fileInfos)
         {
             ArrayList<File> files = new ArrayList<File>();
-            
+
             return files;
         }
     }
@@ -126,8 +155,7 @@ class CommandPut extends AbstractCommand
         }
 
         IDssComponent component = login(arguments);
-        IDssServiceRpcGeneric dssService = component.getDefaultDssService();
-        return new CommandPutExecutor(dssService, arguments).execute();
+        return new CommandPutExecutor(component, arguments).execute();
     }
 
     public String getName()
diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/IDssComponent.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/IDssComponent.java
index 00645ff158e6195b74a18d79f422acb34febed20..4e05e441129a4f23262c4508c77e036f1e1947ef 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/IDssComponent.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/IDssComponent.java
@@ -18,7 +18,8 @@ package ch.systemsx.cisd.openbis.dss.client.api.v1;
 
 import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
 import ch.systemsx.cisd.common.exceptions.InvalidSessionException;
-import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric;
+import ch.systemsx.cisd.common.io.ConcatenatedFileInputStream;
+import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO;
 
 /**
  * A component that manages a connection to openBIS and 1 or more data store servers.
@@ -65,14 +66,16 @@ public interface IDssComponent
             EnvironmentFailureException;
 
     /**
-     * Get a proxy to the default DSS server for the openBIS AS.
+     * Upload a new data set to the DSS.
      * 
+     * @param newDataset The new data set that should be registered
+     * @param inputStream An input stream on the file or folder to register.
      * @throws IllegalStateException Thrown if the user has not yet been authenticated.
      * @throws EnvironmentFailureException Thrown in cases where it is not possible to connect to
      *             the server.
      */
-    public IDssServiceRpcGeneric getDefaultDssService() throws IllegalStateException,
-            EnvironmentFailureException;
+    public void putDataSet(NewDataSetDTO newDataset, ConcatenatedFileInputStream inputStream)
+            throws IllegalStateException, EnvironmentFailureException;
 
     /**
      * Logs the current user out.
diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java
index 76ed7de5587cf835a0427d7305be9c40fd83a537..39e7c04d26d59c3d8eb1afc948316f44d69bf3aa 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/impl/DssComponent.java
@@ -28,10 +28,12 @@ import ch.systemsx.cisd.common.api.RpcServiceInterfaceVersionDTO;
 import ch.systemsx.cisd.common.exceptions.AuthorizationFailureException;
 import ch.systemsx.cisd.common.exceptions.EnvironmentFailureException;
 import ch.systemsx.cisd.common.exceptions.InvalidSessionException;
+import ch.systemsx.cisd.common.io.ConcatenatedFileInputStream;
 import ch.systemsx.cisd.openbis.dss.client.api.v1.IDataSetDss;
 import ch.systemsx.cisd.openbis.dss.client.api.v1.IDssComponent;
 import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.FileInfoDssDTO;
 import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric;
+import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO;
 import ch.systemsx.cisd.openbis.generic.shared.IETLLIMSService;
 import ch.systemsx.cisd.openbis.generic.shared.OpenBisServiceFactory;
 import ch.systemsx.cisd.openbis.generic.shared.ResourceNames;
@@ -178,10 +180,10 @@ public class DssComponent implements IDssComponent
         state = new AuthenticatedState(openBisService, dssServiceFactory, state.getSessionToken());
     }
 
-    public IDssServiceRpcGeneric getDefaultDssService() throws IllegalStateException,
-            EnvironmentFailureException
+    public void putDataSet(NewDataSetDTO newDataset, ConcatenatedFileInputStream inputStream)
+            throws IllegalStateException, EnvironmentFailureException
     {
-        return state.getDefaultDssService();
+        state.putDataSet(newDataset, inputStream);
     }
 }
 
@@ -212,7 +214,8 @@ abstract class AbstractDssComponentState implements IDssComponent
         throw new IllegalStateException("Please log in");
     }
 
-    public IDssServiceRpcGeneric getDefaultDssService() throws IllegalStateException
+    public void putDataSet(NewDataSetDTO newDataset, ConcatenatedFileInputStream inputStream)
+            throws IllegalStateException, EnvironmentFailureException
     {
         throw new IllegalStateException("Please log in");
     }
@@ -340,10 +343,12 @@ class AuthenticatedState extends AbstractDssComponentState
     }
 
     @Override
-    public IDssServiceRpcGeneric getDefaultDssService()
+    public void putDataSet(NewDataSetDTO newDataset, ConcatenatedFileInputStream inputStream)
+            throws IllegalStateException, EnvironmentFailureException
     {
         String url = service.getDefaultDataStoreBaseURL(sessionToken);
-        return getDssServiceForUrl(url);
+        IDssServiceRpcGeneric dssService = getDssServiceForUrl(url);
+        dssService.putDataSet(sessionToken, newDataset, inputStream);
     }
 
     /**
diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/api/v1/DssServiceRpcGeneric.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/api/v1/DssServiceRpcGeneric.java
index fe3aab7cca6a19fa979d33e44bdc9a7da6d852f5..f0f0df34b7c43bf295b6dfcafc671b1a1766921b 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/api/v1/DssServiceRpcGeneric.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/server/api/v1/DssServiceRpcGeneric.java
@@ -87,10 +87,17 @@ public class DssServiceRpcGeneric extends AbstractDssServiceRpc implements IDssS
         }
     }
 
-    public void putDataSet(String sessionToken, NewDataSetDTO newDataSet)
+    public void putDataSet(String sessionToken, NewDataSetDTO newDataSet, InputStream inputStream)
             throws IOExceptionUnchecked, IllegalArgumentException
     {
-        System.out.println("Put " + newDataSet);
+        System.out.println("put " + newDataSet);
+        try
+        {
+            inputStream.close();
+        } catch (IOException ex)
+        {
+
+        }
     }
 
     public int getMajorVersion()
@@ -129,8 +136,8 @@ public class DssServiceRpcGeneric extends AbstractDssServiceRpc implements IDssS
                 .getPath());
     }
 
-    public FileInfoDssDTO[] listFilesForDataSet(String sessionToken,
-            DataSetFileDTO fileOrFolder) throws IOExceptionUnchecked, IllegalArgumentException
+    public FileInfoDssDTO[] listFilesForDataSet(String sessionToken, DataSetFileDTO fileOrFolder)
+            throws IOExceptionUnchecked, IllegalArgumentException
     {
         return this.listFilesForDataSet(sessionToken, fileOrFolder.getDataSetCode(), fileOrFolder
                 .getPath(), fileOrFolder.isRecursive());
diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/IDssServiceRpcGeneric.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/IDssServiceRpcGeneric.java
index 7dcfc8eb76d909dbbdc4990aa6a2b4c4a9d27f8c..8f2e1c9bc10aab6d20999b4b82b5df60230bcb6f 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/IDssServiceRpcGeneric.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/IDssServiceRpcGeneric.java
@@ -82,9 +82,11 @@ public interface IDssServiceRpcGeneric extends IRpcService
      * 
      * @param sessionToken The session token
      * @param newDataset The new data set that should be registered
+     * @param inputStream An input stream on the file or folder to register
      * @throws IOExceptionUnchecked Thrown if an IOException occurs when listing the files
      * @throws IllegalArgumentException Thrown if the dataSetCode or startPath are not valid
      */
-    public void putDataSet(String sessionToken, NewDataSetDTO newDataset)
-            throws IOExceptionUnchecked, IllegalArgumentException;
+    public void putDataSet(String sessionToken, NewDataSetDTO newDataset,
+            InputStream inputStream) throws IOExceptionUnchecked,
+            IllegalArgumentException;
 }
diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/NewDataSetDTO.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/NewDataSetDTO.java
index bfead09d00fe2840c1c94a64fcac743df4741e19..1bcdb9ca3ac9ebd8ca6dd791a39504104b6e07fc 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/NewDataSetDTO.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/NewDataSetDTO.java
@@ -16,14 +16,12 @@
 
 package ch.systemsx.cisd.openbis.dss.generic.shared.api.v1;
 
-import java.io.InputStream;
 import java.io.Serializable;
+import java.util.List;
 
 import org.apache.commons.lang.builder.ToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
 
-import ch.systemsx.cisd.common.io.ConcatenatedFileInputStream;
-
 /**
  * Represents a new data set that the DSS should register.
  * <p>
@@ -38,22 +36,17 @@ public class NewDataSetDTO implements Serializable
 
     private final String storageProcessName;
 
-    private final String fileName;
-
-    private final InputStream inputStream;
+    private final List<FileInfoDssDTO> fileInfos;
 
     /**
      * Constructor
      * 
      * @param storageProcessName The storage process that should handle this data set
-     * @param inputStream An input stream on the file or folder to register. If a folder is to be
-     *            registered, the input stream must be a {@link ConcatenatedFileInputStream}.
      */
-    public NewDataSetDTO(String storageProcessName, String fileName, InputStream inputStream)
+    public NewDataSetDTO(String storageProcessName, List<FileInfoDssDTO> fileInfos)
     {
         this.storageProcessName = storageProcessName;
-        this.fileName = fileName;
-        this.inputStream = inputStream;
+        this.fileInfos = fileInfos;
     }
 
     public String getStorageProcessName()
@@ -61,22 +54,17 @@ public class NewDataSetDTO implements Serializable
         return storageProcessName;
     }
 
-    public String getFileName()
-    {
-        return fileName;
-    }
-
-    public InputStream getInputStream()
+    public List<FileInfoDssDTO> getFileInfos()
     {
-        return inputStream;
+        return fileInfos;
     }
 
     @Override
     public String toString()
     {
         ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
-        sb.append("storageProcess", getStorageProcessName());
-        sb.append("fileName", getFileName());
+        sb.append(getStorageProcessName());
+        sb.append(getFileInfos());
         return sb.toString();
     }
 }