diff --git a/lib/services/fs.js b/lib/services/fs.js
index <HASH>..<HASH> 100644
--- a/lib/services/fs.js
+++ b/lib/services/fs.js
@@ -161,7 +161,8 @@ var remove = function(args) {
 
 // Rename
 var rename = function(args) {
-    if (!args.from || !args.to) throw "Need 'from' and 'to'";
+    if (!args.from || (!args.to && !args.name)) throw "Need 'from' and 'to'";
+    if (args.name) args.to = path.join(path.dirname(args.from), args.name);
 
     return Q.all([
         workspace.path(args.from),
diff --git a/test/rpc_fs.js b/test/rpc_fs.js
index <HASH>..<HASH> 100644
--- a/test/rpc_fs.js
+++ b/test/rpc_fs.js
@@ -83,10 +83,19 @@ describe('RPC fs', function() {
         , done);
     });
 
+    it("can rename a file", function(done) {
+        qdone(
+            rpc.get("fs").rename({
+                from: "test_new2.txt",
+                name: "test_new3.txt"
+            })
+        , done);
+    });
+
     it("can remove a file", function(done) {
         qdone(
             rpc.get("fs").remove({
-                path: "test_new2.txt"
+                path: "test_new3.txt"
             })
         , done);
     });
Add option "name" for fs.rename

Add test for it