Manage Folder

Manage the specified folder

FOLDER

The specified folder to be managed. Click the PICK button to specify or use the %FILENAME% variable to select.

Input Object

In the input object, each key represents the name of a .txt file in the workspace (excluding the file extension), and each value is the text content of that file.

Output Object

Each key added to the 'output' object will be output as a .txt file in the workspace. The file name will be the same as the key, and the text content will be the corresponding value of that key.

API

Provide asynchronous functions: api.files(), api.folders(), api.stat(name), api.rename(oldname, newname), api.remove(name), and api.mkdir(dirname).

// List all files in the specified folder
let files = await api.files()
console.log(files)

// List the folders in the specified folder
let folders = await api.folders()
console.log(folders)

// Read various timestamp information, such as file creation time, modification time, and last access time, for files or subfolders in the specified folder
let info = await api.stat('subfolder')
console.log(info)

// Rename a file in the specified folder
api.rename('report1.pdf', 'report2.pdf')

// Delete a file in the specified folder
api.remove('price.pdf')

// Create a subfolder in the specified folder 
api.mkdir('newfolder')

--

We are dedicated to improving our content. Please let us know if you come across any errors, including spelling, grammar, or other mistakes, as your feedback is valuable to us! 🤖️⚡️

Last updated