none
How do I cut the size of my Web Assets folder in Win 10? RRS feed

  • Question

  • how can I trim or move the web assets folder that's taking up over 100gb of my 250gb SSD?
    Wednesday, April 17, 2019 2:52 AM

Answers

  • Hi,

    I am not quite sure what the files are under this path. Deleting it does not seem to have any effect on the system. But I am not sure if these documents are important to you.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 18, 2019 5:15 AM
    Moderator

All replies

  • Hi,

    To get the size of a folder, you can refer to the following code:

        private void BtGet_Click(object sender, EventArgs e)
        {
            DirectoryInfo TheFolder = new DirectoryInfo("D:\\");
            foreach (DirectoryInfo NextFolder in TheFolder.GetDirectories())
            {
                try
                {
                    if (GetDirectoryLength(NextFolder.FullName) > 1024 * 1024)
                        listBox1.Items.Add(NextFolder.Name + ": " + (GetDirectoryLength(NextFolder.FullName) / 1024 / 1024).ToString());
                }
                catch
                {
                    continue;
                }
            }
        }
    
        // Get folder size
        public static long GetDirectoryLength(string dirPath)
        {
            if (!Directory.Exists(dirPath))
                return 0;
            long len = 0;
    
            DirectoryInfo di = new DirectoryInfo(dirPath);
    
            foreach (FileInfo fi in di.GetFiles())
            {
                len += fi.Length;
            }
    
            DirectoryInfo[] dis = di.GetDirectories();
            if (dis.Length > 0)
            {
                for (int i = 0; i < dis.Length; i++)
                {
                    len += GetDirectoryLength(dis[i].FullName);
                }
            }
            return len;
        }

    Then, to move the folder, you can refer to this document:

    How to: Copy, Delete, and Move Files and Folders.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 17, 2019 5:41 AM
    Moderator
  • Thank you Kyle, but I'm confused. The reason I ask is because I periodically check the size of my SSD drive.  It's only 250 Gigs and it can get filled up quickly. When i was doing that I found that the following folder had become HUGE!

    C:\Users\katsm\AppData\Local\Web Assets

    It's 106 GB total and and I don't know if the documents in that folder are okay for me to move or delete. There are 3 subfolders under Web Assets and they each have 389,140 items and about 4 KB each. They are .png files with long numerical names.

    So, my question really is if these are just data files, can I delete them? And one other thing, should I be worried that this is happening?

    Thanks so much!


    Kathie

    Thursday, April 18, 2019 3:17 AM
  • Hi,

    I am not quite sure what the files are under this path. Deleting it does not seem to have any effect on the system. But I am not sure if these documents are important to you.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 18, 2019 5:15 AM
    Moderator