diff --git a/structr-ui/src/main/resources/structr/js/websocket.js b/structr-ui/src/main/resources/structr/js/websocket.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/websocket.js
+++ b/structr-ui/src/main/resources/structr/js/websocket.js
@@ -277,6 +277,11 @@ function wsConnect() {
 
                 log('CHILDREN', data);
 
+                // sort the folders/files in the Files tab
+                if (command === 'CHILDREN' && result.length > 0 && result[0].name) {
+                    result.sort(function(a,b) { return a.name.localeCompare(b.name); } );
+                }
+
                 $(result).each(function(i, entity) {
 
                     StructrModel.create(entity);
enable sorting by name in files tab of structr-ui