# JavaScript Board
## Rename Files
```javascript
const folder = "robot/Calibre Library/";
const from = "et al. -";
const to = "et al. -";
for (const file of app.vault.getMarkdownFiles()) {
if (!file.path.startsWith(folder) || !file.basename.includes(from)) {
continue;
}
const newPath = file.path.replace(from, to);
if (newPath !== file.path) {
await app.fileManager.renameFile(file, newPath);
}
}
```