1.3.6 • Published 6 months ago
fs-operations v1.3.6
File System Operations
A Node.js package for batch processing of files and directories, supporting rename, delete, move, and copy operations with infinite nesting support.
Features
- Batch Renaming: Rename files and directories in bulk using regular expressions or fixed rules.
- Delete Files and Directories: Remove specified files or directories.
- Move and Copy: Move and copy files and directories.
- Infinite Nesting Support: Recursively process directories with infinite nesting.
- Error Handling: Provides clear error messages to help quickly identify issues.
Installation
npm install fs-operations --save-dev
Usage
Rename Files and Directories
import { renameFiles } from "fs-operations";
(async () => {
await renameFiles("./test", /old/, "new"); // Replace "old" with "new" in filenames and directory names
})();
Delete Files and Directories
import { deleteFiles } from "fs-operations");
(async () => {
await deleteFiles("./test", /delete/); // Delete files and directories with names containing "delete"
})();
Move Files and Directories
import { moveFiles } from "fs-operations";
(async () => {
await moveFiles("./test/source", "./test/destination"); // Move a directory
})();
Copy Files and Directories
import { copyFiles } from "fs-operations";
(async () => {
await copyFiles("./test/source", "./test/copy"); // Copy a directory
})();
1.2.0
6 months ago
1.1.0
6 months ago
1.0.0
6 months ago
1.3.6
6 months ago
1.3.5
6 months ago
1.3.4
6 months ago
1.3.3
6 months ago
1.2.4
6 months ago
1.3.2
6 months ago
1.2.3
6 months ago
1.3.1
6 months ago
1.2.2
6 months ago
1.0.15
9 years ago
1.0.14
9 years ago
1.0.13
9 years ago
1.0.12
9 years ago
1.0.11
9 years ago
1.0.10
9 years ago
1.0.9
9 years ago
1.0.8
9 years ago
1.0.7
9 years ago
1.0.6
9 years ago
1.0.4
9 years ago
1.0.3
9 years ago
1.0.2
9 years ago
1.0.1
9 years ago