Get folder size error 800A004C

I am trying to make a script Counts the size of a folder.
I am getting a vbs error "Path not found" 800A004C on line 19 (Q = Q + F.size)
dim oFS, oFolder
set oFS = WScript.CreateObject("Scripting.FileSystemObject")
set oFolder = oFS.GetFolder("E:\NEW-backup\")
set qFS = WScript.CreateObject("Scripting.FileSystemObject")
set logFolder = qFS.GetFolder("E:\Backup Logs\")
ShowFolderDetails oFolder
sub ShowFolderDetails(oF)
dim F
dim Q
dim antalGB
dim attachment
dim subject
Q=0
for each F in oF.Subfolders
Q = Q + F.Size
Next
antalGB = "Dagens backup fylder: " + FormatNumber(((Q/1024)/1024)/1024, 2) + " GB" + "\n\nMvh\n"
If I run the script on E:\Backup instead of E:\NEW-backup I get no errors.
Please help I am a noob to scripting

If you can try in PowerShell - the below sample code may help you - THis returns folder size in MB
function Get-FolderSize
param ( [String]$Path )
$FileSystemObject = New-Object -com Scripting.FileSystemObject
$folders = (Get-Childitem $path | ? {$_.Attributes -eq "Directory"})
foreach ($folder in $folders)
$folder | Add-Member -MemberType NoteProperty -Name "SizeMB" –Value(($FileSystemObject.GetFolder($folder.FullName).Size) / 1MB)
$folders | sort -Property SizeMB -Descending | select fullname,@{n=’Size MB’;e={"{0:N2}" –f $_.SizeMB}}
Get-FolderSize -Path C:\Temp\
You may get some insight / help for your code as well!
Regards Chen V [MCTS SharePoint 2010]

Similar Messages

  • How to get folder size in bytes

    Hi all,
    Is there a easy way to get folder size in bytes?  I don't want to check each file in it and then add them up.
    Thanks for any help.
    Anne

    Years ago, I found my home PC was lacking disk space and could not exaplain where all of the space went.
    At the same time I was teaching myslef how to use the Picture control and Windows did not allow you to check the size of a folder and it sub-folders. So I used that situation to learn about the picture control and LV at the same time.
    It worked and ran but very slowly.
    Soon after Greg McKaskle was putting together the first version of "The Good The Bad and The Ugly" and was looking for fodder to beat up. I offered and he accepted. When the time came for the presentation, my code was chosen as "The bad" since I had not learned how to do a cluster sort at that time so I wrote my own version of a bubble sort (the VI presents a Pie Chart of disk usage and clcik on the sectors of the Pie Chart allowed you to drill down so I hd to sort by sizes).
    So why am I telling you this long boring story?
    That code is attached for you to look at laugh and tell me how dumb I was.
    Feel free to beat me up. It can't be any worse than the abuse I got from Greg (I felt like I was being raped).
    Have fun!
    Ben
    Code is probably 6 or thereabouts. "Disk_Utility" is top level. Remember this is an example of how NOT to code.
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    DIsk_Pie_Utility.zip ‏162 KB

  • Get folder size

    I am trying to get the size of a folder I used:
    Set Archive to "Martha:EyeTV Archive"
    Set ASize to size of (info for Archive)
    I get and error on "info for Archive" saying it can find the file. This is a folder not a file. Do I have to use a shell script:
    Set ASize to word 1 of (do shell script "/usr/bin/du -ks" & quoted form of (POSIX path of (Archive as string)))

    By the way, since the Standard Additions scripting dictionary describes the “info for” command as deprecated, maybe you'd better use the following code:
    set Archive to POSIX file "/Volumes/Martha/EyeTV Archive" as alias
    tell application "System Events" to set ASize to size of Archive
    You could also ask for the “physical size” property of the Archive folder.

  • How do I get folder sizes?

    How can I get the finder to calculate folder sizes?
    I've clicked Calculate all sizes in view options.
    Even when I ask for info on a particular folder, I get a blank.
    It gives the sizes of files but never for folders: just two little dashes
    Is this a bug, or is there some extra button I now have to push?

    I believe there's a bug in the Finder that will prevent it from calculating folder sizes. I've only run into it a couple times: for example, Size in the Finder's Inspector window always shows -- (which is normal until the Finder calculates the size). In this case, the Finder doesn't calculate the size, but quitting and relaunching the Finder works to restore proper behavior.

  • How can I burn a 5GB iso to a dual layer DVD (I get a size error..)

    I converted a 5GB *.mkv to iso for dual layer dvd with devede. When I try to burn the iso with growisofs -dvd-compat -Z /dev/sr0 /home/hk/movie/movie.iso, I get: /movie.iso is larger than 4GiB-1.
    -allow-limited-size was not specified. There is no way do represent this file size. Aborting.
    :-( write failed: Input/output error
    What could I do? Thank you

    Chances are the ISO is not dvd compliant & does not contain layer change info:
    http://forum.doom9.org/archive/index.php/t-113514.html
    EDIT: Alternative
    For the lazy you can install ImgBurn into a Windows NT4 bottle/prefix
    then install the latest ASPI.dll
    issue a wineboot for the bottle/prefix
    then build the dvd in ImgBurn BUT you will need to use dvdauthor to create the correct dvd folder structure & files
    http://forum.imgburn.com/index.php?showtopic=1777
    Last edited by t0m5k1 (2013-05-22 14:49:24)

  • "Can't get folder 'a'" Error with Applescript

    Here is my complete applescript application. I am supposed to select a series folder, and it goes into the folder and for each season folder does something inside, including grabbing the name of the season folder. But it keep throwing an error on the line set folderName to name of folder aFolder saying it can't get name of folder "a", but the only folders inside the folder I select are Season 1, Season 2, and Season 3. Additionally, looking at the replies part of the script editor it looks like it does "M" first with no errors, and they goes to "a". I have no idea where this is coming from so help me if you can. Disregard the weird formatting, copying everything from the script editor into here messed everything up. Thanks.
    set seriesFolder to (choose folder with prompt "Select TV Series Folder") as text
    tell application "Finder" to set tvName to "list of " & (name of folder seriesFolder as text) & " episodes"
    openWebpage(tvName)
    repeat with aFolder in seriesFolder
      tell application "Finder"
      set folderName to name of folder aFolder
      set whichFile to every file of folder aFolder
      sort whichFile by name
      end tell
      set sNumber to "0" & ((characters -1 thru -1 of folderName) as string)
      set epNum to 1
      repeat with aFile in whichFile
      if epNum is less than 10 then
      set ifZero to "0"
      else
      set ifZero to ""
      end if
      set textBox to "What is episode title for S" & (sNumber as string) & "E" & ifZero & epNum & "?"
      tell application "Finder"
      set filename to name of aFile
      set nameEnding to ((characters -4 thru -1 of filename) as string)
      display dialog textBox default answer ""
      set text_returned to text returned of result
      set name of aFile to "S" & (sNumber as string) & "E" & ifZero & (epNum as string) & " - " & text_returned & nameEnding
      end tell
      set epNum to epNum + 1
      end repeat
    end repeat
    on openWebpage(input)
      set seriesName to input
      set needle to " "
      set replacement to "+"
      set searchName to search_replace(seriesName, needle, replacement)
      set address to "http://www.en.wikipedia.org/w/index.php?search=" & searchName & "&title=Special%3ASearch&go=Go"
      tell application "Safari" to open location address
    end openWebpage
    on search_replace(seriesName, needle, replacement)
      set old_delimiters to AppleScript's text item delimiters
      set AppleScript's text item delimiters to needle
      set temp_list to every text item of seriesName
      set AppleScript's text item delimiters to replacement
      set return_value to temp_list as text
      set AppleScript's text item delimiters to old_delimiters
      return return_value
    end search_replace

    Try replacing the beginning of the script with:
    set seriesFolder to (choose folder with prompt "Select TV Series Folder")
    tell application "Finder"
    set tvName to "list of " & (name of folder seriesFolder as text) & " episodes"
    tell me to openWebpage(tvName)
    repeat with aFolder in (get folders of seriesFolder)
    set folderName to name of aFolder
    (109908)

  • JAVA Heap Size Error in SAP Work Manager

    We are getting the below error wrt Java Heap size in the SAP Work manager Application:
    2014/08/08 00:48:56.142:setImportParameters::STORAGE_REF_KEY=ET_COMPLEX_TABLE
    2014/08/08 00:48:56.143: + User=MAINTMGR
    2014/08/08 00:48:56.143: execute::::MAINTMGR::before BAPI execute: /SMERP/MM_CTMATPLANT_GET
    2014/08/08 00:55:20.905: + BackEnd=Java-1
    2014/08/08 00:55:20.905: Exception while updating complex table 'ctpart': JavaBackEndError: JAVA EXCEPTION CAUGHT: java.lang.OutOfMemoryError: Java heap space in AgentryJavaComplexTableIterator::hasNext at AgentryJavaComplexTableIterator.cpp:52
    2014/08/08 00:55:21.099: + Thread=6588
    2014/08/08 00:55:21.099: + Thread Pool=Server
    2014/08/08 00:55:21.099: + WorkFunction=00000000020DEF90
    2014/08/08 00:55:21.099: + User=MAINTMGR
    2014/08/08 00:55:21.099: + User=MAINTMGR
    2014/08/08 00:55:21.099: Received Logout Request message 18 status changed to 'In Progress'
    2014/08/08 00:55:21.105: Logged out (but not yet cleaned up)
    We have tried to increase the initial and maximum heap size in the Agentry.ini file from 256 / 512 to 512 / 2048 respectively. But the
    error still persists.
    Can you please let us know if there are any
    other changes required for
    the same?
    PFA the Java backend and the user
    logs. Please treat this ticket with
    the highest priority.
    Thanks,
    Boopalan

    Looks like ur getting   heap size error while trying to fetch  records for ctparts complex table. From platform  point of view you have increased heap size. Next step is to analyze application settings for ctparts  complex table. As indicated by Steve from application point you need check the need for  amount of materials your trying to retrive , can you set filter for ctparts ,  does  ctparts  BAPI execute in SAP without any timeout error.
    What is the version of Work Manager your using ?    With WM 6.1 you have options to  take advantage of data staging that is delievered as part of standard application.
    Thanks
    Manju.

  • Part of Photoshop isn't functioning.  Under adjustments, when HDR toning is clicked on I get a code:  Error 48: File or folder does not exist.  Line:11  - $.evalFile(g_StackScriptFolderPath   "StackSupport.jsx");  How can it be fixed?

    The phone company was here working on something while I was gone.  They sat down at my computer (iMac) and since then HDR toning doesn't work.  Get the code:   Error 48: File or folder does not exist.    Line: 11     ->  $.evalFile(g_StacScriptFolderPatch + "StackSupport.jsx");   How can this be fixed?   

    Go to //Applications/Adobe Photoshop [Version]/Presets/ Scripts/Stack Scripts Only/ and see if StackSupport.jsx is there. If it is not, uninstall and reinstall Photoshop to have it added back in. If it is there, first try recreating the Photoshop Preferences (hold down Command+Option+Shift while launching Photoshop).

  • I am getting the following error message when trying to open a link to a folder

    "This file is set to be launched by this PDF file. This is currently disallowed by your system administrator."
    Currently I am using Reader 9, I was using Reader 7 earlier today and the link opened the folder with no problem. Nothing has been changed on the PDF file containing the link, nothing has been changed in the link, and if I go to another computer in the office that is still running Reader 7 the folder still opens. I also tried another computer in the office running Reader 9, the folder doesn't open, and I get the same error message.
    Any ideas on how to fix this issue would be great. Thanks

    Hi,
    The issue that you are referring to maybe because of a fix provided by Adobe to prevent any external attacks. The following links may be of help to you:
    http://www.adobe.com/support/security/bulletins/apsb10-15.html
    http://news.softpedia.com/news/Adobe-Finally-Fixes-Launch-Bug-145757.shtml
    To allow certain files of yours to be able to open external files and operate witout restriction, you can try and add the files to the Privileged locations section and the restrictions on the files will be lifted:
    1. Open Adobe Reader 9.4.0 and goto Edit | Preferences
    2. From the Left side pane, goto Security (Enhanced)
    3. Click on Add File button and add the file for which you want the restrictions to be lifted. Click on OK to close the dialogs and relaunch Adobe Reader. This will enable you to open external attachments as well as allow JavaScripts to be executed from the PDF file mentioned.

  • How do I get my HP 2645 to print 4x6 cards. It gives me a mismatch paper size error

    How do I get my HP 2645 to print 4x6 cards?   It gives me a mismatch paper size error.

    Hi @aleek,
    Thank you for visiting the HP Support Forums! I see you would like to print 4x6 cards to your HP Deskjet Ink Advantage 2645, when you attempt to print the card you get a 'Paper Mismatch' error.
    I would like you to go ahead and take a look in your User Guide on page 10, here it shows how to load the media and change the printing preferences, although it shows Photos, you would use the same guidelines and steps for the Index cards, just be sure to change the media type to the correct card you are using.
    Once you have the media loaded and settings set if you are still getting the error, continue here: 'Paper Mismatch,' or 'Paper Size Mismatch' Error Message Displays When Printing
    I hope this helps, if you have anymore questions please let me know.
    HevnLgh
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • Leopard.  Did a full restore from Time Machine.  Now I can't access my other internal and external drives.  I get the following error: The folder "Capture Video" can't be opened because you don't have permission to see its contents.

    Leopard.  Did a full restore from Time Machine.  Now I can't access my other internal and external drives.  I get the following error: The folder “Capture Video” can’t be opened because you don’t have permission to see its contents.  I have repaired permissions pn the main harddrive.  When I try too click on a disk I get the previously stated error.  I can't even open up information to see what permission/access there is.  It simply will not let me see the content.  It shows the content of my main hard drive when I have clicked the other harddrive's name.

    Solved:
    sudo chflags 0 /Volumes/"FCP Time Machine BU"
    sudo chown 0:80 /Volumes/"FCP Time Machine BU"
    sudo chmod 775 /Volumes/"FCP Time Machine BU"
    sudo chmod -N /Volumes/"FCP Time Machine BU"

  • File / Folder size... How do Finder gets it?

    Hi there!
    While checking some of my hardrives for sucessfull shell script execution backups, i noticed that Finder took a loooot of time to provide the info about the Folder / File size on the Information window, while a simple ls -l could provide on the fly values regarding file or folder size, as always, fast simple and faithfull unix mindset!
    Well, that makes me wonder, how does Finder calculates those values? Anyone got an hint?
    Does it make it all by himself, if so. WHY? Been an "posix" system, shouldn't he be using whats already provided by its *nix heritage?
    In this case, the value is already there, why don't use it and simply parse it to the desired format (MB / GB / TB)?
    Maybe this could be only one of several features (GUI) that could improve it's performance from being more "conscious" of the system natively provided "toolkit".
    Please, this is only my humble thouhgts on this, and please do shut me up if totally wrong!
    Hope to get some nice and interesting feedback from the OS X community!
    If there's a better spot to start this kind of discussion, please do mention it, i will appreciate it!
    Best regards.

    Properties. Short Cuts, Change Icon resolved the issue after restarting. Problem resolved.. Thank you for all the help Dwain

  • Getting recv buffer size error even after tuning

    I am on AIX 5.3, IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3...), Coherence 3.1.1/341
    I've set the following parameters as root:
    no -o sb_max=4194304
    no -o udp_recvspace=4194304
    no -o udp_sendspace=65536
    I still get the following error:
    UnicastUdpSocket failed to set receive buffer size to 1428 packets (2096304 bytes); actual size is 44 packets (65536 bytes)....
    The following commands/responses confirm that the settings are in place:
    $ no -o sb_max
    sb_max = 4194304
    $ no -o udp_recvspace
    udp_recvspace = 4194304
    $ no -o udp_sendspace
    udp_sendspace = 65536
    Why am I still getting the error? Do I need to bounce the machine or is there a different tunable I need to touch?
    Thanks
    Ghanshyam

    Can you try running the attached utility, and send us the output. It will simply try to allocate a variety of socket buffer sizes and report which succeed and which fail. Based on the Coherence log message I expect this program will also fail to allocate a buffer larger then 65536, but it will allow you verify the issue externally from Coherence.
    There was an issue with IBM's 1.4 AIX JVM which would not allow allocation of buffers larger then 1MB. This program should allow you to identify if 1.5 has a similar issue. If so you may wish to contact IBM support regarding obtaining a patch.
    thanks,
    Mark<br><br> <b> Attachment: </b><br>so.java <br> (*To use this attachment you will need to rename 399.bin to so.java after the download is complete.)<br><br> <b> Attachment: </b><br>so.class <br> (*To use this attachment you will need to rename 400.bin to so.class after the download is complete.)

  • Trying to sync iPhone to pc but keeps getting internal device error on screen, also showing only 4gb size instead of 32gb. Uninstalled iTunes from pc and reloaded. Powered back up and all songs and info still in place. Anyone had this problem before?

    Trying to sync iPhone to pc but keeps getting internal device error on screen, also showing only 4gb size instead of 32gb. Uninstalled iTunes from pc and reloaded. Powered back up and all songs and info still in place. Anyone had this problem before?

    Doublechecking something Emcee. I see you've got Windows 7 x64, so I'm assuming you've got at least 4 GB of RAM. Do you also have an NVIDIA USB EHCI chipset on that PC? If so, see the following Microsoft document:
    [You encounter problems when you move data over USB from a Windows 7 or Windows Server 2008 R2-based computer that has an NVIDIA USB EHCI chipset and at least 4GB of RAM|http://support.microsoft.com/kb/976972]

  • When i open shared Document folder getting "An unexpected error has occurred. " error

    Hi,
    I am getting "An unexpected error has occurred. " error when i open Shared Document folder in Internet URL. But if i open the foder in newtab i can view the documents with out error also intranet URL also doesnt have any problem. I am using SharePoint
    2007. Kindly help me resove this issue

    @Manikandan,
    Can you check the ULS logs to find what is the error. The default location of log files will be C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS for MOSS 2007.
    If is allowed for you to change the callstack and customerrors mode setting in the web.config then change those values to see the error.
    Find: <SafeMode CallStack="false" />
    Replace with: <SafeMode CallStack="true" />
    Find: <customErrors mode="On" />
    Replace with: <customErrors mode="Off" />
    http://social.msdn.microsoft.com/Forums/en-US/4ffee924-8878-4443-85a9-1ac89f7fbbfb/debugging-a-web-part-an-unexpected-error-has-occurred-trace-log?forum=sharepointdevelopmentlegacy
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

Maybe you are looking for

  • Loss of people picker column data during import/export of a list in SharePoint 2010

    Hi  Even we are facing the same issue. i a have meeting minutes(ootb) list, there are totally 100 items with multiple participant in Participant column, when i try to import export that list to some other site. participant column loosing the data, fo

  • My hard drive failed, I'm still under warranty, but they won't send me a replacemen​t

    They say it's company policy.  Apparently, they don't think I'm capable of doing it myself.  If I want them to honor my warranty, I'm going to have to send my entire laptop to them so a trained professional can perform this delicate procedure. I'd ra

  • ExportAsDrag() Bug in Suse linux???

    Hey there, i have a problem using the exportAsDrag() method of a Transferhandler. On Windows the following code works fine, On Suse Linux, something seem to go completely wrong. What i want to do is to make a drag and drop mechanism. When i click on

  • Project Billing-only / standalone implementation

    Does anyone have the experience of implementing Project Billing as a standalone module - ie without using functionalities of Project Costing? I understand that we would still need to do the project fundation setups, but we don't plan to use any featu

  • Iphoto won't open/accept images from USB drive

    Hello. I copied a bunch of photos from another mac onto a USB drive. Then I put them on my desktop. They are all jgp files (IMG_033.jpg, for example) , but I can't open any of them. I can't open them from the desktop, I can't drag them into iphoto, a