Skip to main content
Changing the phrasing of the question to be more usful
Source Link
Kenneth Moore
  • 1.2k
  • 1
  • 13
  • 16

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders (the icon shown in the file explorer is that of an empty folder) however, folders whose subfolders are also empty will not be flagged (their icon shows a folder containing files). This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

How can I iterate over folders with empty subfolders and "flag" them via the use of a Batch file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know how it could be achieved. However, any tips or suggestions on how to achieve this functionality would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and "flag" that folder (to flag it we could change the icon of the 'Project' folder back to the Empty Folder icon, change the name or "gray it out"). As shown Below:

enter image description here

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders however, folders whose subfolders are also empty will not be flagged. This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

How can I iterate over folders with empty subfolders and "flag" them via the use of a Batch file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know how it could be achieved. However, any tips or suggestions on how to achieve this functionality would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and "flag" that folder (to flag it we could change the icon of the 'Project' folder back to the Empty Folder icon, change the name or "gray it out"). As shown Below:

enter image description here

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders (the icon shown in the file explorer is that of an empty folder) however, folders whose subfolders are also empty will not be flagged (their icon shows a folder containing files). This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

How can I iterate over folders with empty subfolders and "flag" them via the use of a Batch file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know how it could be achieved. However, any tips or suggestions on how to achieve this functionality would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and "flag" that folder (to flag it we could change the icon of the 'Project' folder back to the Empty Folder icon, change the name or "gray it out"). As shown Below:

enter image description here

Changing the phrasing of the question to be more usful
Source Link
Kenneth Moore
  • 1.2k
  • 1
  • 13
  • 16

Would it be possible to have a .bat Windows CMD or BATCH file that flags"flags" empty folders (and folders that only contain empty folders)

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders however, folders whose subfolders are also empty will not be flagged. This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

Is it possible to flagHow can I iterate over folders with empty subfolders and "flag" them via the use of a .batBatch file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know ifhow it is possiblecould be achieved. However, any tips or suggestions on how to achieve itthis functionality would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and "flag" that folder (to flag it we could change the icon of the 'Project' folder back to the Empty Folder icon, change the name or "gray it out"). As shown Below:

enter image description here

Would it be possible to have a .bat file that flags empty folders (and folders that only contain empty folders)

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders however, folders whose subfolders are also empty will not be flagged. This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

Is it possible to flag folders with empty subfolders via the use of a .bat file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know if it is possible. However, any tips or suggestions on how to achieve it would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and change the icon of the 'Project' folder back to the Empty Folder icon. As shown Below:

enter image description here

Windows CMD or BATCH file that "flags" empty folders (and folders that only contain empty folders)

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders however, folders whose subfolders are also empty will not be flagged. This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

How can I iterate over folders with empty subfolders and "flag" them via the use of a Batch file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know how it could be achieved. However, any tips or suggestions on how to achieve this functionality would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and "flag" that folder (to flag it we could change the icon of the 'Project' folder back to the Empty Folder icon, change the name or "gray it out"). As shown Below:

enter image description here

added 145 characters in body
Source Link
Kenneth Moore
  • 1.2k
  • 1
  • 13
  • 16

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders however, folders whose subfolders are also empty will not be flagged. This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

Is it possible to flag folders with empty subfolders via the use of a .bat file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know if it is possible. However, any tips or suggestions on how to achieve it would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description hereenter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and change the icon of the 'Project' folder back to the Empty Folder icon. As shown Below:

enter image description here

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders however, folders whose subfolders are also empty will not be flagged. This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

Is it possible to flag folders with empty subfolders via the use of a .bat file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know if it is possible. However, any tips or suggestions on how to achieve it would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and change the icon of the 'Project' folder back to the Empty Folder icon.

Most companies I have worked for start new projects with a templated folder structure. Windows will automatically flag empty folders however, folders whose subfolders are also empty will not be flagged. This can create confusion and lead to mistakes during the early stages of a project as it would appear at a glance that some folders have had their content added when they really only contain empty subfolders.

So my question is:

Is it possible to flag folders with empty subfolders via the use of a .bat file.

The .bat file would need to search through subfolders to determine if a folder has any real content. If the folder does not have real content then the .bat file would need to flag it (flagging could be done with a change of its icon or filename). This would make it much easier to navigate new projects with large templated folder structures.

I don't need a completed file, I would just like to know if it is possible. However, any tips or suggestions on how to achieve it would be more than welcome!

*Edit

Just to clarify I will show an example: If I create an empty folder called 'Project' it will display with the Empty Folder icon. As shown Below:

enter image description here

Now I will add a new folder to my project folder called 'I am Empty':

enter image description here

The folder 'Project' no longer displays with the Empty Folder icon. It now uses the icon that shows it with content. As shown Below:

enter image description here

What I want is a .bat file that will parse the contents of the 'Project' folder and determine that it only contains the 'I am Empty' folder, which is empty and change the icon of the 'Project' folder back to the Empty Folder icon. As shown Below:

enter image description here

Elaborating with picture based examples
Source Link
Kenneth Moore
  • 1.2k
  • 1
  • 13
  • 16
Loading
Source Link
Kenneth Moore
  • 1.2k
  • 1
  • 13
  • 16
Loading