Can I still use the internal variable !FOLDER?

I wrote the following macro to rename macros in a specified folder but when I try to store the name of the folder to work on I get the error:
[error]: Not allowed to write to ‘!FOLDER’
Here is the code I used:
{
“Name”: “RemoveCasePrefix”,
“CreationDate”: “2025-4-16”,
“Commands”: [
{
“Command”: “store”,
“Target”: “A_Favorite”,
“Value”: “!FOLDER”,
“Description”: “Set the folder to the A Group of Top Favorites folder”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var fs = require(‘fs’); var folder = ${!FOLDER}; var files = fs.readdirSync(folder).filter(f => f.endsWith(‘.json’)); files;”,
“Value”: “fileList”,
“Description”: “Get a list of all macro files (.json)”
},
{
“Command”: “forEach”,
“Target”: “fileList”,
“Value”: “fileName”,
“Description”: “Loop through each macro file”
},
{
“Command”: “store”,
“Target”: “${fileName}”,
“Value”: “currentFileName”,
“Description”: “Store the current file name”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var fileName = ${currentFileName}; var newFileName = fileName.startsWith(‘Case.’) ? fileName.substring(5) : fileName; newFileName;”,
“Value”: “newFileName”,
“Description”: “Check if the filename starts with ‘Case.’, if yes then remove the prefix, else retain the old name.”
},
{
“Command”: “if”,
“Target”: “${currentFileName} != ${newFileName}”,
“Value”: “”,
“Description”: “Check if new file name is different from old name”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var fs = require(‘fs’); var oldPath = ${!FOLDER} + ‘/’ + ${currentFileName}; var newPath = ${!FOLDER} + ‘/’ + ${newFileName}; fs.renameSync(oldPath, newPath);”,
“Value”: “”,
“Description”: “Rename the file”
},
{
“Command”: “echo”,
“Target”: “Renamed ${currentFileName} to ${newFileName}”,
“Value”: “”,
“Description”: “Log the rename”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Skipping ${currentFileName}”,
“Value”: “”,
“Description”: “Log the skip”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “End for each loop”
}
]
}

What should be the content of a !FOLDER variable?

I was trying to use it to specify a Folder in my Ui vision panel. I am trying to remove the “Case.” prefix that I named them with originally.There are almost 200 macro in that folder and I am trying to avoid renaming them individually.

I attempted using the new AI feature to try to back up my macros manually, it gave me internal variable !FOLDER_MACROS. But when I try to run it, I get an error that says that it isn’t supported. Is there a more recent version of this variable I can use? I want to manually backup from HTML5 Storage because there is a problem with back up in this instance of UI Vision extension. I want to back up everything and uninstall and reinstall the extension.

Here is the backup code I used:
{
“Name”: “Backup_Macros_To_Zip”,
“CreationDate”: “2025-4-23”,
“Commands”: [
{
“Command”: “store”,
“Target”: “${!FOLDER_MACROS}”,
“Value”: “macrosPath”,
“Description”: “”
},
{
“Command”: “executeScript”,
“Target”: “const JSZip = require(‘jszip’);\nconst fs = require(‘fs’);\nconst path = require(‘path’);\n\nasync function zipMacros(macrosPath) {\n const zip = new JSZip();\n \n // Read all files in macros directory\n const files = fs.readdirSync(macrosPath);\n \n files.forEach(file => {\n if (file.endsWith(‘.json’)) {\n const filePath = path.join(macrosPath, file);\n const content = fs.readFileSync(filePath);\n zip.file(file, content);\n }\n });\n\n // Generate zip file\n const zipContent = await zip.generateAsync({type: ‘nodebuffer’});\n \n // Save to downloads folder with timestamp\n const timestamp = new Date().toISOString().replace(/[:.]/g, ‘-’);\n const zipPath = path.join(process.env.HOME, ‘Downloads’, UIVision_Macros_${timestamp}.zip);\n \n fs.writeFileSync(zipPath, zipContent);\n return zipPath;\n}\n\nreturn zipMacros(‘${macrosPath}’);”,
“Value”: “zipPath”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Macros backed up to: ${zipPath}”,
“Value”: “”,
“Description”: “”
}
]
}