Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanel.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanel.java	(revision 0)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanel.java	(revision 1084)
@@ -0,0 +1,48 @@
+package org.gvsig.scripting.app.extension;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.DefaultListModel;
+import javax.swing.ListSelectionModel;
+import org.gvsig.scripting.DataFolderFound;
+import org.gvsig.tools.swing.api.JListWithCheckbox;
+import org.gvsig.tools.swing.api.ListElement;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.ToolsSwingManager;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class DataFoldersRecoverPanel extends DataFoldersRecoverPanelView {
+    
+    private final List<DataFolderFound> dataFoldersFound;
+    private JListWithCheckbox lstCheckedDataFolders;
+    
+    public DataFoldersRecoverPanel(List<DataFolderFound> dataFoldersFound) {
+        this.dataFoldersFound = dataFoldersFound;
+        this.initComponents();
+    }
+
+    private void initComponents() {
+        ToolsSwingManager manager = ToolsSwingLocator.getToolsSwingManager();
+        this.lstCheckedDataFolders = manager.createJListWithCheckbox(lstDataFolders);
+        DefaultListModel model = new DefaultListModel();
+        for (DataFolderFound dataFolderFound : dataFoldersFound) {
+            model.addElement(new ListElement<>(dataFolderFound.getApplicationName(), dataFolderFound));
+        }
+        this.lstDataFolders.setModel(model);
+    }
+    
+    public List<DataFolderFound> getSelectedDataFolders() {
+        List<DataFolderFound> r = new ArrayList<>();
+        ListSelectionModel checkedModel = this.lstCheckedDataFolders.getCheckedModel();
+        for (int i = 0; i < dataFoldersFound.size(); i++) {
+            if( checkedModel.isSelectedIndex(i) ) {
+                r.add(dataFoldersFound.get(i));
+            }
+        }
+        return r;
+    }
+    
+}
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/ScriptingUtils.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/ScriptingUtils.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/ScriptingUtils.java	(revision 1084)
@@ -1,8 +1,3 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
 package org.gvsig.scripting.app.extension;
 
 import java.io.File;
@@ -24,10 +19,12 @@
 import java.util.List;
 import java.util.function.Predicate;
 import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOCase;
 import org.apache.commons.lang3.BooleanUtils;
+import org.gvsig.scripting.DataFolderFound;
 import org.gvsig.scripting.ScriptingBaseScript;
 import org.gvsig.scripting.ScriptingFolder;
 import org.gvsig.scripting.ScriptingLocator;
@@ -42,24 +39,30 @@
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.exception.BaseException;
 import org.gvsig.tools.i18n.I18nManager;
+import org.gvsig.tools.packageutils.PackageManager;
+import org.gvsig.tools.packageutils.Version;
 import org.gvsig.tools.swing.api.ToolsSwingLocator;
 import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager;
+import org.gvsig.tools.swing.api.windowmanager.Dialog;
 import org.gvsig.tools.swing.api.windowmanager.WindowManager;
+import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2;
 import org.gvsig.tools.task.SimpleTaskStatus;
 import org.gvsig.tools.visitor.VisitCanceledException;
 import org.gvsig.tools.visitor.Visitor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
+import org.gvsig.tools.util.FolderSet;
+import org.gvsig.tools.util.impl.DefaultFolderSet;
 /**
  *
  * @author jjdelcerro
  */
+@SuppressWarnings("UseSpecificCatch")
 public class ScriptingUtils {
     
     public static final String SKIP_AUTORUNS = "skipAutoruns";
     
-    private static final Logger logger = LoggerFactory.getLogger(ScriptingExtension.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(ScriptingExtension.class);
 
     private boolean executingAutorunScripts = false;
     private static boolean composer_initialized = false;
@@ -84,20 +87,22 @@
     public static void log(int level, String message, Throwable th) {
         switch( level ) {
         case TRACE:
-            logger.trace(message, th);
+            LOGGER.trace(message, th);
             break;
         case ERROR:
-            logger.error(message, th);
+            LOGGER.error(message, th);
             break;
         case WARN:
-            logger.warn(message, th);
+            LOGGER.warn(message, th);
             break;
         default:
         case INFO:
-            logger.info(message, th);
+            LOGGER.info(message, th);
             break;
         }
     }
+    private String appversion;
+    private File pluginHomeFolder;
 
     public ScriptingUtils() {
         message = new MessageWait();
@@ -141,6 +146,8 @@
     
     public void initializaPaths(List<File> pluginsFolder, File installFolder, File pluginHoneFolder, String appversion) {
 
+        this.appversion = appversion;
+        this.pluginHomeFolder = pluginHoneFolder;
         ScriptingManager manager = ScriptingLocator.getManager();
         manager.setHomeFolder(getScriptsHomeFolder(pluginHoneFolder, appversion));
 
@@ -179,7 +186,7 @@
             try {
                 FileUtils.forceMkdir(localAddonRepositoryFolder);
             } catch (IOException ex) {
-                logger.info("Can't create addons folder in '" + localAddonRepositoryFolder.getAbsolutePath() + "'.", ex);
+                LOGGER.info("Can't create addons folder in '" + localAddonRepositoryFolder.getAbsolutePath() + "'.", ex);
             }
         }
         File initAddonFile = new File(localAddonRepositoryFolder, "__init__.py");
@@ -187,7 +194,7 @@
             try {
                 FileUtils.touch(initAddonFile);
             } catch (IOException ex) {
-                logger.info("Can't create addons __init__ file in '" + localAddonRepositoryFolder.getAbsolutePath() + "'.", ex);
+                LOGGER.info("Can't create addons __init__ file in '" + localAddonRepositoryFolder.getAbsolutePath() + "'.", ex);
             }
         }
     }
@@ -278,7 +285,7 @@
             status.add();
             final I18nManager i18nManager = ToolsLocator.getI18nManager();            
             try {
-                logger.info("Searching "+title+" scripts...");
+                LOGGER.info("Searching "+title+" scripts...");
                 dialogs.message(
                     i18nManager.getTranslation("_Searching_autorun_scripts_Xhorizontal_ellipsisX"),
                     JOptionPane.INFORMATION_MESSAGE
@@ -296,7 +303,7 @@
                             if( script.isEnabled() ) {
                                 scripts.add(script);
                             } else {
-                                logger.info("Skip "+title+" script '" + script.getFile().getAbsolutePath() + "'.");
+                                LOGGER.info("Skip "+title+" script '" + script.getFile().getAbsolutePath() + "'.");
                             }
                         }
                     }
@@ -318,7 +325,7 @@
                 
             } finally {
                 composer_initialized = true;
-                logger.info("Running "+title+" scripts terminated.");
+                LOGGER.info("Running "+title+" scripts terminated.");
                 dialogs.message("", JOptionPane.INFORMATION_MESSAGE);
                 status.terminate();
             }
@@ -421,7 +428,7 @@
                         status.setCurValue(n++);
                     }
                     try {
-                        logger.info("running " + title + " script '" + script.getFile().getAbsolutePath() + "' (" + getScriptOrderKey(script) + ", " + script.getIsolationGroup() + ").");
+                        LOGGER.info("running " + title + " script '" + script.getFile().getAbsolutePath() + "' (" + getScriptOrderKey(script) + ", " + script.getIsolationGroup() + ").");
                         dialogs.message(
                                 i18nManager.getTranslation(
                                         "_Running_autorun_script_from_XnameX",
@@ -436,7 +443,7 @@
                     try {
                         script.run();
                     } catch (Exception ex) {
-                        logger.warn("Can't execute " + title + " from '" + script.getFile().getAbsolutePath() + "'.", ex);
+                        LOGGER.warn("Can't execute " + title + " from '" + script.getFile().getAbsolutePath() + "'.", ex);
                     }
                 }
             }
@@ -488,7 +495,7 @@
                                 if (script.isEnabled()) {
                                     scripts.add(script);
                                 } else {
-                                    logger.info("Skip " + title + " script '" + file.getAbsolutePath() + "'.");
+                                    LOGGER.info("Skip " + title + " script '" + file.getAbsolutePath() + "'.");
                                 }
                             }
                         }
@@ -506,17 +513,59 @@
                         Files.walkFileTree(Paths.get(folder.getFile().toURI()), opts, Integer.MAX_VALUE, visitor);
                     }
                 } catch (Exception ex) {
-                    logger.warn("Can't execute " + title + " in home.", ex);
+                    LOGGER.warn("Can't execute " + title + " in home.", ex);
                 }
                 sortScripts(scripts);
                 executeScripts(scripts, null);
 
             } finally {
-                logger.info("Running " + title + " scripts terminated.");
+                LOGGER.info("Running " + title + " scripts terminated.");
                 dialogs.message("", JOptionPane.INFORMATION_MESSAGE);
                 executingAutorunScripts = false;
             }
+            checkDataFoldersVersions();
         }
 
     }
+    
+    private void checkDataFoldersVersions() {
+        final ScriptingManager manager = ScriptingLocator.getManager();
+        PackageManager versionFactory = ToolsLocator.getPackageManager();
+        Version currentVersion = versionFactory.createVersion(this.appversion);
+        FolderSet folders = new DefaultFolderSet();
+        folders.add(this.pluginHomeFolder);
+        final List<DataFolderFound> dataFoldersFound = manager.searchOldVersions(currentVersion, folders);
+        if( dataFoldersFound == null || dataFoldersFound.isEmpty() ) {
+            return;
+        }
+        Runnable askUser = new Runnable() {
+            @Override
+            public void run() {
+                WindowManager_v2 winManager = (WindowManager_v2) ToolsSwingLocator.getWindowManager();
+                DataFoldersRecoverPanel panel = new DataFoldersRecoverPanel(dataFoldersFound);
+                Dialog dialog = winManager.createDialog(
+                        panel,
+                        "Recuperacion de preferencias",
+                        "Seleccione los complementos de los que recuperar las preferencias.",
+                        WindowManager_v2.BUTTONS_OK_CANCEL
+                );
+                dialog.show(WindowManager.MODE.DIALOG);
+                if (dialog.getAction() == WindowManager_v2.BUTTON_OK) {
+                    List<DataFolderFound> toRestore = panel.getSelectedDataFolders();
+                    for (DataFolderFound dataFolderFound : dataFoldersFound) {
+                        if (toRestore.contains(dataFolderFound)) {
+                            dataFolderFound.restore();
+                        } else {
+                            dataFolderFound.leave();
+                        }
+                    }
+                }
+            }
+        };
+        if( SwingUtilities.isEventDispatchThread() ) {
+            askUser.run();
+        } else {
+            SwingUtilities.invokeLater(askUser);
+        }
+    }
 }
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanelView.xml
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanelView.xml	(revision 0)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanelView.xml	(revision 1084)
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<object classname="com.jeta.forms.store.memento.FormPackage">
+ <at name="fileversion">
+  <object classname="com.jeta.forms.store.memento.FormsVersion2">
+   <at name="major">2</at>
+   <at name="minor">0</at>
+   <at name="sub">0</at>
+  </object>
+ </at>
+ <at name="form">
+  <object classname="com.jeta.forms.store.memento.FormMemento">
+   <super classname="com.jeta.forms.store.memento.ComponentMemento">
+    <at name="cellconstraints">
+     <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+      <at name="column">1</at>
+      <at name="row">1</at>
+      <at name="colspan">1</at>
+      <at name="rowspan">1</at>
+      <at name="halign">default</at>
+      <at name="valign">default</at>
+      <at name="insets" object="insets">0,0,0,0</at>
+     </object>
+    </at>
+    <at name="componentclass">com.jeta.forms.gui.form.FormComponent</at>
+   </super>
+   <at name="id">H6de2c5D1689639f40aLL8000</at>
+   <at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at>
+   <at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE</at>
+   <at name="components">
+    <object classname="java.util.LinkedList">
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">2</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">lblMsg1</at>
+            <at name="width">583</at>
+            <at name="text">&lt;html&gt;Han sido encontradas preferencias de versiones anteriores para algunos complementos.&lt;/html&gt;</at>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="height">14</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">4</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">com.jeta.forms.components.label.JETALabel</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">com.jeta.forms.components.label.JETALabel</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="name">lblMsg2</at>
+            <at name="width">583</at>
+            <at name="text">&lt;html&gt;Seleccione los complementos para los que desea recuperar las preferencias de versiones anteriores&lt;/html&gt;</at>
+            <at name="fill">
+             <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+              <at name="name">fill</at>
+             </object>
+            </at>
+            <at name="height">14</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+     <item >
+      <at name="value">
+       <object classname="com.jeta.forms.store.memento.BeanMemento">
+        <super classname="com.jeta.forms.store.memento.ComponentMemento">
+         <at name="cellconstraints">
+          <object classname="com.jeta.forms.store.memento.CellConstraintsMemento">
+           <at name="column">2</at>
+           <at name="row">6</at>
+           <at name="colspan">1</at>
+           <at name="rowspan">1</at>
+           <at name="halign">default</at>
+           <at name="valign">default</at>
+           <at name="insets" object="insets">0,0,0,0</at>
+          </object>
+         </at>
+         <at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at>
+        </super>
+        <at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at>
+        <at name="beanclass">javax.swing.JList</at>
+        <at name="beanproperties">
+         <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+          <at name="classname">javax.swing.JList</at>
+          <at name="properties">
+           <object classname="com.jeta.forms.store.support.PropertyMap">
+            <at name="border">
+             <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+              <super classname="com.jeta.forms.store.properties.BorderProperty">
+               <at name="name">border</at>
+              </super>
+              <at name="borders">
+               <object classname="java.util.LinkedList">
+                <item >
+                 <at name="value">
+                  <object classname="com.jeta.forms.store.properties.DefaultBorderProperty">
+                   <super classname="com.jeta.forms.store.properties.BorderProperty">
+                    <at name="name">border</at>
+                   </super>
+                  </object>
+                 </at>
+                </item>
+               </object>
+              </at>
+             </object>
+            </at>
+            <at name="scrollableTracksViewportHeight">true</at>
+            <at name="scrollableTracksViewportWidth">true</at>
+            <at name="name">lstDataFolders</at>
+            <at name="width">581</at>
+            <at name="items">
+             <object classname="com.jeta.forms.store.properties.ItemsProperty">
+              <at name="name">items</at>
+             </object>
+            </at>
+            <at name="scollBars">
+             <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+              <at name="name">scollBars</at>
+              <at name="verticalpolicy">20</at>
+              <at name="horizontalpolicy">30</at>
+             </object>
+            </at>
+            <at name="height">78</at>
+           </object>
+          </at>
+         </object>
+        </at>
+       </object>
+      </at>
+     </item>
+    </object>
+   </at>
+   <at name="properties">
+    <object classname="com.jeta.forms.store.memento.PropertiesMemento">
+     <at name="classname">com.jeta.forms.gui.form.GridView</at>
+     <at name="properties">
+      <object classname="com.jeta.forms.store.support.PropertyMap">
+       <at name="border">
+        <object classname="com.jeta.forms.store.properties.CompoundBorderProperty">
+         <super classname="com.jeta.forms.store.properties.BorderProperty">
+          <at name="name">border</at>
+         </super>
+         <at name="borders">
+          <object classname="java.util.LinkedList"/>
+         </at>
+        </object>
+       </at>
+       <at name="name"></at>
+       <at name="fill">
+        <object classname="com.jeta.forms.store.properties.effects.PaintProperty">
+         <at name="name">fill</at>
+        </object>
+       </at>
+       <at name="scollBars">
+        <object classname="com.jeta.forms.store.properties.ScrollBarsProperty">
+         <at name="name">scollBars</at>
+         <at name="verticalpolicy">21</at>
+         <at name="horizontalpolicy">31</at>
+        </object>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="cellpainters">
+    <object classname="com.jeta.forms.store.support.Matrix">
+     <at name="rows">
+      <object classname="[Ljava.lang.Object;" size="7">
+       <at name="item" index="0">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="1">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="2">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="3">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="4">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="5">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+       <at name="item" index="6">
+        <object classname="[Ljava.lang.Object;" size="3"/>
+       </at>
+      </object>
+     </at>
+    </object>
+   </at>
+   <at name="rowgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+   <at name="colgroups">
+    <object classname="com.jeta.forms.store.memento.FormGroupSet">
+     <at name="groups">
+      <object classname="java.util.HashMap"/>
+     </at>
+    </object>
+   </at>
+  </object>
+ </at>
+</object>
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanelView.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanelView.java	(revision 0)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/java/org/gvsig/scripting/app/extension/DataFoldersRecoverPanelView.java	(revision 1084)
@@ -0,0 +1,148 @@
+package org.gvsig.scripting.app.extension;
+
+import com.jeta.open.i18n.I18NUtils;
+import com.jgoodies.forms.layout.CellConstraints;
+import com.jgoodies.forms.layout.FormLayout;
+import java.awt.BorderLayout;
+import java.awt.ComponentOrientation;
+import java.awt.Container;
+import java.awt.Dimension;
+import javax.swing.Box;
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+
+public class DataFoldersRecoverPanelView extends JPanel
+{
+   JLabel lblMsg1 = new JLabel();
+   JLabel lblMsg2 = new JLabel();
+   JList lstDataFolders = new JList();
+
+   /**
+    * Default constructor
+    */
+   public DataFoldersRecoverPanelView()
+   {
+      initializePanel();
+   }
+
+   /**
+    * Adds fill components to empty cells in the first row and first column of the grid.
+    * This ensures that the grid spacing will be the same as shown in the designer.
+    * @param cols an array of column indices in the first row where fill components should be added.
+    * @param rows an array of row indices in the first column where fill components should be added.
+    */
+   void addFillComponents( Container panel, int[] cols, int[] rows )
+   {
+      Dimension filler = new Dimension(10,10);
+
+      boolean filled_cell_11 = false;
+      CellConstraints cc = new CellConstraints();
+      if ( cols.length > 0 && rows.length > 0 )
+      {
+         if ( cols[0] == 1 && rows[0] == 1 )
+         {
+            /** add a rigid area  */
+            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
+            filled_cell_11 = true;
+         }
+      }
+
+      for( int index = 0; index < cols.length; index++ )
+      {
+         if ( cols[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
+      }
+
+      for( int index = 0; index < rows.length; index++ )
+      {
+         if ( rows[index] == 1 && filled_cell_11 )
+         {
+            continue;
+         }
+         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
+      }
+
+   }
+
+   /**
+    * Helper method to load an image file from the CLASSPATH
+    * @param imageName the package and name of the file to load relative to the CLASSPATH
+    * @return an ImageIcon instance with the specified image file
+    * @throws IllegalArgumentException if the image resource cannot be loaded.
+    */
+   public ImageIcon loadImage( String imageName )
+   {
+      try
+      {
+         ClassLoader classloader = getClass().getClassLoader();
+         java.net.URL url = classloader.getResource( imageName );
+         if ( url != null )
+         {
+            ImageIcon icon = new ImageIcon( url );
+            return icon;
+         }
+      }
+      catch( Exception e )
+      {
+         e.printStackTrace();
+      }
+      throw new IllegalArgumentException( "Unable to load image: " + imageName );
+   }
+
+   /**
+    * Method for recalculating the component orientation for 
+    * right-to-left Locales.
+    * @param orientation the component orientation to be applied
+    */
+   public void applyComponentOrientation( ComponentOrientation orientation )
+   {
+      // Not yet implemented...
+      // I18NUtils.applyComponentOrientation(this, orientation);
+      super.applyComponentOrientation(orientation);
+   }
+
+   public JPanel createPanel()
+   {
+      JPanel jpanel1 = new JPanel();
+      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
+      CellConstraints cc = new CellConstraints();
+      jpanel1.setLayout(formlayout1);
+
+      lblMsg1.setName("lblMsg1");
+      lblMsg1.setText("<html>Han sido encontradas preferencias de versiones anteriores para algunos complementos.</html>");
+      jpanel1.add(lblMsg1,cc.xy(2,2));
+
+      lblMsg2.setName("lblMsg2");
+      lblMsg2.setText("<html>Seleccione los complementos para los que desea recuperar las preferencias de versiones anteriores</html>");
+      jpanel1.add(lblMsg2,cc.xy(2,4));
+
+      lstDataFolders.setName("lstDataFolders");
+      JScrollPane jscrollpane1 = new JScrollPane();
+      jscrollpane1.setViewportView(lstDataFolders);
+      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+      jpanel1.add(jscrollpane1,cc.xy(2,6));
+
+      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7 });
+      return jpanel1;
+   }
+
+   /**
+    * Initializer
+    */
+   protected void initializePanel()
+   {
+      setLayout(new BorderLayout());
+      add(createPanel(), BorderLayout.CENTER);
+   }
+
+
+}
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingScript.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingScript.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingScript.java	(revision 1084)
@@ -81,4 +81,6 @@
 	public Object invokeFunction(String name, Object[] args) throws NoSuchMethodException;
 	
         public String getMimeType();
+        
+        public void registerDataFolder(String id);
 }
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingManager.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingManager.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingManager.java	(revision 1084)
@@ -4,8 +4,10 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import org.gvsig.tools.packageutils.Version;
 import org.gvsig.tools.service.spi.ProviderFactory;
 import org.gvsig.tools.script.ScriptManager;
+import org.gvsig.tools.util.FolderSet;
 
 /**
  * There are two top level management roles within ScriptingFramework: logical
@@ -34,6 +36,10 @@
 
     public File getDataFolder(String id);
     
+    public void registerDataFolder(ScriptingFolder folderScript, String id);
+    
+    public List<DataFolderFound> searchOldVersions(Version currentVersion, FolderSet folder);
+    
     /**
      * Returns the System's Folder
      *
@@ -80,7 +86,19 @@
      * @return {@link ScriptingFolder}
      */
     public ScriptingFolder getFolder(File file);
+    
+    /**
+     * Return the {@link ScriptingUnit} associated with the path specified.
+     * 
+     * the path should start with "User" or "System".
+     * 
+     * @param pathName
+     * 
+     * @return the required {@link ScriptingUnit}
+     */
+    public ScriptingUnit getUnit(String pathName);
 
+
     /**
      * Returns the path of the User's Folder
      *
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingFolder.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingFolder.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/ScriptingFolder.java	(revision 1084)
@@ -38,6 +38,8 @@
      * @return a {@link ScriptingUnit} with the content extracted from the file.
      */
     public ScriptingUnit getUnit(File file);
+    
+    public ScriptingUnit getUnit(String path);
 
     /**
      * Gets all the {@link ScriptingUnit}s contained in a ScriptingFolder.
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/DataFolderFound.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/DataFolderFound.java	(revision 0)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.api/src/main/java/org/gvsig/scripting/DataFolderFound.java	(revision 1084)
@@ -0,0 +1,28 @@
+package org.gvsig.scripting;
+
+import java.io.File;
+import org.gvsig.tools.packageutils.Version;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public interface DataFolderFound {
+
+    ScriptingFolder getApplicationFolder();
+
+    String getApplicationName();
+
+    String getDataFolderId();
+
+    File getNewDataFolder();
+
+    File getOldDataFolder();
+
+    Version getOldDataFolderVersion();
+
+    void leave();
+
+    void restore();
+
+}
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/SystemFolder.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/SystemFolder.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/SystemFolder.java	(revision 1084)
@@ -11,10 +11,13 @@
 
 public class SystemFolder extends DefaultScriptingFolder {
 
+    public final static String ID = "SystemFolder";
+    
+    @SuppressWarnings("OverridableMethodCallInConstructor")
     public SystemFolder(ScriptingManager manager) {
         super(manager);
         this.setName("System");
-        this.setId("SystemFolder");
+        this.setId(ID);
         this.setDescription("Scripts del Sistema");
     }
 
@@ -40,7 +43,7 @@
 
     @Override
     public Unit getUnit(File afile) {
-        Unit unit = null;
+        Unit unit;
         String path = afile.getPath();
         if (path.startsWith("/")) {
             path = path.substring(1);
@@ -49,9 +52,9 @@
         List<RegisterSystemFolder> folders = this.manager.getSystemFolders();
         for (int i = 0; i < folders.size(); i++) {
             RegisterSystemFolder systemfolder = folders.get(i);
-            DefaultScriptingFolder folder = new DefaultScriptingFolder(this, manager, systemfolder.folder.getAbsoluteFile());
-            if (path.startsWith(folder.getId() + "/")) {
-                unit = folder.getUnit(new File(path.substring(folder.getId().length() + 1)));
+            DefaultScriptingFolder theFolder = new DefaultScriptingFolder(this, manager, systemfolder.folder.getAbsoluteFile());
+            if (path.startsWith(theFolder.getId() + "/")) {
+                unit = theFolder.getUnit(new File(path.substring(theFolder.getId().length() + 1)));
                 if (unit != null) {
                     return unit;
                 }
@@ -66,9 +69,9 @@
         List<RegisterSystemFolder> folders = this.manager.getSystemFolders();
         for (int i = 0; i < folders.size(); i++) {
             RegisterSystemFolder systemfolder = folders.get(i);
-            DefaultScriptingFolder folder = new DefaultScriptingFolder(this, manager, systemfolder.folder.getAbsoluteFile());
-            folder.setName(systemfolder.name);
-            ol.add(folder);
+            DefaultScriptingFolder theFolder = new DefaultScriptingFolder(this, manager, systemfolder.folder.getAbsoluteFile());
+            theFolder.setName(systemfolder.name);
+            ol.add(theFolder);
         }
         return ol;
     }
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/AbstractScript.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/AbstractScript.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/AbstractScript.java	(revision 1084)
@@ -58,5 +58,8 @@
         }
 	
 
+        public void registerDataFolder(String id) {
+            this.getManager().registerDataFolder(this.getParent(), id);
+        }
        
 }
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingScript.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingScript.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingScript.java	(revision 1084)
@@ -15,7 +15,6 @@
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
-import java.util.concurrent.locks.ReentrantLock;
 
 import javax.script.Compilable;
 import javax.script.CompiledScript;
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DataFolderManager.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DataFolderManager.java	(revision 0)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DataFolderManager.java	(revision 1084)
@@ -0,0 +1,246 @@
+package org.gvsig.scripting.impl;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.scripting.DataFolderFound;
+import org.gvsig.tools.packageutils.Version;
+import org.gvsig.scripting.ScriptingFolder;
+import org.gvsig.scripting.ScriptingManager;
+import static org.gvsig.scripting.impl.DefaultScriptingManager.LOG;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.packageutils.PackageManager;
+import org.gvsig.tools.util.FolderSet;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+@SuppressWarnings("UseSpecificCatch")
+public class DataFolderManager {
+
+    class DefaultDataFolderFound implements DataFolderFound {
+
+        private final String dataFolderId;
+        private final ScriptingFolder applicationFolder;
+        private final File newDataFolder;
+        private final File oldDataFolder;
+        private final Version oldDataFolderVersion;
+
+        public DefaultDataFolderFound(
+                String dataFolderId,
+                ScriptingFolder applicationFolder,
+                File newDataFolder,
+                File oldDataFolder,
+                Version oldDataFolderVersion
+        ) {
+            this.dataFolderId = dataFolderId;
+            this.applicationFolder = applicationFolder;
+            this.newDataFolder = newDataFolder;
+            this.oldDataFolder = oldDataFolder;
+            this.oldDataFolderVersion = oldDataFolderVersion;
+        }
+
+        @Override
+        public String getDataFolderId() {
+            return this.dataFolderId;
+        }
+
+        @Override
+        public ScriptingFolder getApplicationFolder() {
+            return this.applicationFolder;
+        }
+
+        @Override
+        public String getApplicationName() {
+            return this.applicationFolder.getName();
+        }
+
+        @Override
+        public File getNewDataFolder() {
+            return this.newDataFolder;
+        }
+
+        @Override
+        public File getOldDataFolder() {
+            return this.oldDataFolder;
+        }
+
+        @Override
+        public Version getOldDataFolderVersion() {
+            return this.oldDataFolderVersion;
+        }
+
+        @Override
+        public void restore() {
+            try {
+                FileUtils.copyDirectory(this.oldDataFolder, this.newDataFolder);
+                Properties props = getDataFolderRegister();
+                props.setProperty(this.dataFolderId + ".processed", "true");
+                saveDataFolderRegistry(props);
+            } catch (IOException ex) {
+                throw new RuntimeException("Can't restore data folder found.", ex);
+            }
+        }
+
+        @Override
+        public void leave() {
+            Properties props = getDataFolderRegister();
+            props.setProperty(this.dataFolderId + ".processed", "true");
+            saveDataFolderRegistry(props);
+        }
+    }
+
+    private final ScriptingManager manager;
+
+    public DataFolderManager(ScriptingManager manager) {
+        this.manager = manager;
+    }
+
+    private File getHomeFolder() {
+        return this.manager.getHomeFolder();
+    }
+
+    private void createFolder(File f) {
+        if (!f.exists()) {
+            try {
+                FileUtils.forceMkdir(f);
+                LOG.info("Created scripting folder '" + f.getAbsolutePath() + "'");
+            } catch (Throwable e) {
+                LOG.warn("Can't Create scripting folder '" + f.getAbsolutePath() + "'");
+            }
+        }
+    }
+
+    private Properties getDataFolderRegister() {
+        File f = FileUtils.getFile(getHomeFolder(), "data.properties");
+        Properties props = new Properties();
+        if (f.exists()) {
+            FileInputStream inStream = null;
+            try {
+                inStream = new FileInputStream(f);
+                props.load(inStream);
+            } catch (Exception ex) {
+
+            } finally {
+                IOUtils.closeQuietly(inStream);
+            }
+        }
+        return props;
+    }
+
+    private void saveDataFolderRegistry(Properties props) {
+        File f = FileUtils.getFile(getHomeFolder(), "data.properties");
+        FileOutputStream out = null;
+        try {
+            out = new FileOutputStream(f);
+            props.store(out, "");
+        } catch (Exception ex) {
+
+        } finally {
+            IOUtils.closeQuietly(out);
+        }
+    }
+
+    public File getDataFolder(String id) {
+        File f = FileUtils.getFile(getHomeFolder(), "data", id);
+        createFolder(f);
+        return f;
+    }
+
+    public void registerDataFolder(ScriptingFolder folderScript, String id) {
+        String userPath = folderScript.getUserPath();
+        Properties props = getDataFolderRegister();
+        if ( StringUtils.equals(props.getProperty(id),userPath)) {
+            return;
+        }
+        props.put(id, userPath);
+        saveDataFolderRegistry(props);
+    }
+
+    public List<DataFolderFound> searchOldVersions(Version currentVersion, FolderSet folder) {
+        List<DataFolderFound> founds = new ArrayList<>();
+        Properties props = getDataFolderRegister();
+        for (Object key : props.keySet()) {
+            String dataFolderId = (String) key;
+            boolean processed = BooleanUtils.toBoolean(props.getProperty(dataFolderId + ".processed"));
+            if (!processed) {
+                String dataFolderName = props.getProperty(dataFolderId);
+                searchOldVersions(founds, currentVersion, folder, dataFolderId, dataFolderName);
+            }
+        }
+        if( founds.isEmpty() ) {
+            return null;
+        }
+        return founds;
+    }
+
+    private void searchOldVersions(
+            final List<DataFolderFound> founds, 
+            final Version currentVersion, 
+            final FolderSet folderSet, 
+            final String dataFolderId, 
+            final String dataFolderName
+        ) {
+        final PackageManager versionFactory = ToolsLocator.getPackageManager();
+        File[] folders = folderSet.listFiles(new FileFilter() {
+            @Override
+            public boolean accept(File pathname) {
+                if( !pathname.isDirectory() ) {
+                    return false;
+                }                
+                try {
+                    String name = FilenameUtils.getBaseName(pathname.getName());
+                    
+                    // Falla con una excepcion si "name" no es una version valida
+                    Version version = versionFactory.createVersion(name);
+                    if( currentVersion.compareTo(version)==0 ) {
+                        return false;
+                    }
+                    File dataFolder = FileUtils.getFile(pathname, "data", dataFolderId);
+                    if( dataFolder.exists() && dataFolder.isDirectory() ) {
+                        return true;
+                    }
+                } catch(Exception ex) {                    
+                }
+                return false;
+            }
+        });
+        if( ArrayUtils.isEmpty(folders) ) {
+            return;
+        }
+        
+        File newDataFolder = FileUtils.getFile(getHomeFolder(), "data", dataFolderId);
+        ScriptingFolder applicationFolder = (ScriptingFolder) this.manager.getUnit(dataFolderName);
+        DataFolderFound dataFolderFound = null;
+        for (File folder : folders) {
+            File oldDataFolder = FileUtils.getFile(folder, "data", dataFolderId);
+            Version oldDataFolderVersion = versionFactory.createVersion(
+                    FilenameUtils.getBaseName(folder.getName())
+            );
+            if( dataFolderFound==null || 
+                oldDataFolderVersion.compareTo(dataFolderFound.getOldDataFolderVersion())>0 ) {
+                dataFolderFound = new DefaultDataFolderFound(
+                    dataFolderId, 
+                    applicationFolder, 
+                    newDataFolder, 
+                    oldDataFolder, 
+                    oldDataFolderVersion
+                );
+            }
+        }
+        if( dataFolderFound!=null ) {
+            founds.add(dataFolderFound);
+        }
+    }
+}
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/FileUtils.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/FileUtils.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/FileUtils.java	(revision 1084)
@@ -95,4 +95,8 @@
         org.apache.commons.io.FileUtils.moveDirectory(srcDir, destDir);
     }
     
+    static void copyDirectory(File srcDir, File destDir) throws IOException {
+        org.apache.commons.io.FileUtils.copyDirectory(srcDir, destDir);
+    }
+    
 }
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingManager.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingManager.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingManager.java	(revision 1084)
@@ -19,6 +19,7 @@
 import javax.swing.ImageIcon;
 
 import org.apache.commons.lang3.StringUtils;
+import org.gvsig.scripting.DataFolderFound;
 import org.gvsig.scripting.ScriptingBaseScript;
 import org.gvsig.scripting.ScriptingDialog;
 import org.gvsig.scripting.ScriptingExternalFile;
@@ -26,13 +27,16 @@
 import org.gvsig.scripting.ScriptingManager;
 import org.gvsig.scripting.ScriptingScript;
 import org.gvsig.scripting.ScriptingUnit;
+import org.gvsig.tools.packageutils.Version;
 import org.gvsig.tools.script.Script;
 import org.gvsig.tools.service.spi.ProviderFactory;
+import org.gvsig.tools.util.FolderSet;
 import org.python.jsr223.MyPyScriptEngine;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
+@SuppressWarnings("UseSpecificCatch")
 public class DefaultScriptingManager implements ScriptingManager {
 
     public static class RegisterSystemFolder {
@@ -63,6 +67,9 @@
     private File packagesFolder;
     private final Map properties = new HashMap();
     private final Map<String,ScriptEngine> engineGroups = new HashMap<>();
+    private DataFolderManager dataFolderManager = null;
+    private ScriptingFolder userFolder = null;
+    private ScriptingFolder systemFolder = null;
     
     @SuppressWarnings({"OverridableMethodCallInConstructor", "LeakingThisInConstructor"})
     public DefaultScriptingManager() {
@@ -129,13 +136,27 @@
         this.addLibFolder(new File(this.home, "lib"));
     }
     
+    private DataFolderManager getDataFolderManager() {
+        if( this.dataFolderManager==null ) {
+            this.dataFolderManager = new DataFolderManager(this);
+        }
+        return this.dataFolderManager;
+    }
+    
     @Override
     public File getDataFolder(String id) {
-        File f = FileUtils.getFile(getHomeFolder(), "data",id);
-        createFolder(f);
-        return f;
+        return this.getDataFolderManager().getDataFolder(id);
     }
 
+    public void registerDataFolder(ScriptingFolder folderScript, String id ) {
+        this.getDataFolderManager().registerDataFolder(folderScript, id);
+    }
+
+    @Override
+    public List<DataFolderFound> searchOldVersions(Version currentVersion, FolderSet folder) {
+        return this.getDataFolderManager().searchOldVersions(currentVersion, folder);
+    }
+    
     protected synchronized ScriptEngineManager getEngineManager() {
         if (this.engineManager == null) {
             this.engineManager
@@ -379,12 +400,32 @@
         return folder;
     }
 
+    public ScriptingUnit getUnit(String pathName) {
+        ScriptingUnit unit = null;
+        String[] parts = StringUtils.split(pathName, '/');
+        if( pathName.equals(this.getUserFolder().getName()) ) {
+            unit = this.getUserFolder().getUnit( 
+                    StringUtils.join(parts, "/", 1, parts.length) 
+            );
+        } else if( pathName.equals(this.getSystemFolder().getName()) ) {
+            unit = this.getSystemFolder().getUnit( 
+                    StringUtils.join(parts, "/", 1, parts.length) 
+            );
+        } 
+        return unit;
+    }
+    
     public ScriptingUnit getUnit(File file) {
         ScriptingFolder folder;
         ScriptingUnit unit;
 
         if (file.isAbsolute()) {
-            folder = new DefaultScriptingFolder(null, this, file.getParentFile());
+            if( FileUtils.isSameFile(this.getRootUserFolder(), file.getParentFile()) ) {
+                folder = this.getUserFolder();
+                // FIXME: que pasa si esta en SystemFolder ???
+            } else {
+                folder = new DefaultScriptingFolder(null, this, file.getParentFile());
+            }
             unit = folder.getUnit(file);
             return unit;
         } else {
@@ -405,12 +446,18 @@
 
     @Override
     public ScriptingFolder getSystemFolder() {
-        return new SystemFolder(this);
+        if( this.systemFolder == null ) {
+            this.systemFolder = new SystemFolder(this);
+        }
+        return  this.systemFolder;
     }
 
     @Override
     public ScriptingFolder getUserFolder() {
-        return new UserFolder(this, this.getRootUserFolder());
+        if( this.userFolder == null ) {
+            this.userFolder = new UserFolder(this, this.getRootUserFolder());
+        }
+        return  this.userFolder;
     }
 
     @Override
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingFolder.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingFolder.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/DefaultScriptingFolder.java	(revision 1084)
@@ -118,6 +118,36 @@
         }
 
     }
+    
+    public Unit getUnit(String path) {
+        path = FilenameUtils.normalizeNoEndSeparator(path, true);
+        if( path == null ) {
+            return null;
+        }
+        File f;
+        ScriptingUnit unit;
+        String[] path_a = StringUtils.split(path, '/');
+        switch( path_a.length ) {
+            case 0:
+                return null;
+            default:
+                f = new File(this.getFile(), path_a[0]);
+                unit = this.getUnit(f);
+                if( unit instanceof ScriptingFolder ) {
+                    unit = ((ScriptingFolder) unit).getUnit(
+                            StringUtils.join(path_a, '/', 1, path_a.length)
+                    );
+                    return (Unit) unit;
+                }
+                return null;
+            case 1:
+                f = new File(this.getFile(), path_a[0]);
+                unit = this.getUnit(f);
+                return (Unit) unit;
+        }
+        
+    }
+    
 
     @Override
     public Unit getUnit(File afile) {
Index: org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/UserFolder.java
===================================================================
--- org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/UserFolder.java	(revision 1083)
+++ org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.lib/org.gvsig.scripting.lib.impl/src/main/java/org/gvsig/scripting/impl/UserFolder.java	(revision 1084)
@@ -7,11 +7,14 @@
 
 public class UserFolder extends DefaultScriptingFolder {
 
+    public final static String ID = "UserFolder";
+    
+    @SuppressWarnings("OverridableMethodCallInConstructor")
     public UserFolder(ScriptingManager manager, File folder) {
         super(null, manager, folder);
         this.setName("User");
         this.setDescription("Scripts del usuario");
-        this.setId("UserFolder");
+        this.setId(ID);
     }
 
     @Override
