|<- [[Directory creation]]|[[Renaming and removing directories]] ->| - renameSync - unLink var fs= require("fs"); fs.renameSync("file.js", "file.json"); fs.rename("file.js", "file.json", function(error) { if (error) { console.log(error); } else { console.log("fichier renommé"); } }); try { fs.unlinkSync("file.json"); } catch (error) { console.log(error); } fs.unLink("file.json", function(error) { if (error) { console.log(error); } else { console.log("ok"); }