VSCode and Ionic/Cordova Platform File Locking

If your running into file locking, like in the platform/android/assets/www folder, trying to use the Ionic or Cordova CLI tools with VSCode you need to exclude those folders from your VSCode’s explorer. The benefit here is also they will disappear from your search results from VSCode as well.

The error you might be receiving might look like:

rm: could not remove directory (code ENOTEMPTY): pathto\platforms\android\assets\www/js/libs

In Windows select File->Preferences->Workspace Settings.

2016-06-24 21_02_16-settings.json - Responder - Visual Studio Code

A split screen editor will appear, edit the right hand window, it may be almost blank and include the files.exclude object from below.

// Place your settings in this file to overwrite default and user settings.
“files.exclude”: {
“**/.git”: true,
“**/.DS_Store”: true,
“**/node_modules”: true,
“node_modules”: true,
“platforms”: true,
“plugins”: true


Once you save the settings.json file they should disappear from your VSCode explorer, but you may need to restart VSCode to make sure.

About: Shawn Jackson

I’ve spent the last 18 years in the world of Information Technology on both the IT and Development sides of the aisle. I’m currently a Software Engineer for Paylocity. In addition to working at Paylocity, I’m also the Founder of Resgrid, a cloud services company dedicated to providing logistics and management solutions to first responder organizations, volunteer and career fire departments, EMS, ambulance services, search and rescue, public safety, HAZMAT and others.