Comparing count and combined file sizes of specific file types in target folder and subfolders

Hi all,
I have a script that I use to delete files with a certain file extension in a folder and its subfolders. I would like to enhance to the script by counting the total number of files and their combined size in MB that the script is deleting and use this information
in a popup where a message will say something like "X No. Files deleted totalling YMB
The existing script so far is:
get-childitem  -include *.****.rfa -recurse | foreach ($_) {remove-item $_.fullname}
Can any advise what I need to add as I'm quite new to powershell.
Thanks

So you do not know how to write a simple output statement.  I think you need to start here:
http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
Not specifically within Powershell no, like I said I only started looking at it this week as an alternative to VBS.
Nothing is being declared.  You need to learn the basics of PowerShell.  We cannot teach you one line at a time.
Really? So the author of
this website is talking rubbish is he? ("Once data is assigned to a PowerShell variable, it’s automatically declared.")
I never asked for line-by-line hand holding nor am I someone who wants others to write the entire code for me. Examples of previous scripts that perform similar or partial operations would have been a good way to guide a new user unfamiliar to this topic.
Additionally posting modified(incorrect) and unfinished script examples without clearly stating what your code is doing nor that additional lines of code need to be added before the script will operate as outlined in the original post is confusing to someone
with 0 experience in this area.
On forums I frequent that are relevant to subjects which I have good experience with, whenever I respond to a genuine query of that has an example of what they are trying to create/modify, I will happily provide a full example and/or explain what I
have done so the OP understands exactly what I did to achieve their request in my example. For someone with your points tally (and likely a respected poster amongst your peers on this site) responding with what is essentially "RFTM Noob" I trust you can understand
is somewhat disappointing.

Similar Messages

  • Trying to drag pdf files i have and combine them into one pdf file in the account i just purchased with Adobe. when i drag a pdf file over Adobe doesn't accept it. says it can not convert this type of file. but it is an Adobe file. Do I need to change it?

    Trying to drag pdf files i have and combine them into one pdf file in the account i just purchased with Adobe. when i drag a pdf file over Adobe doesn't accept it. says it can not convert this type of file. but it is an Adobe file. Do I need to change it in some other form befor dragging it?

    Hello djensen1x,
    Could you please let me know what version of Acrobat are you using.
    Also, tell me your workflow of combining those PDF files?
    Please share the screenshot of the error message that you get.
    Hope to get your response.
    Regards,
    Anubha

  • I print 2 pages to pdf and file size is 600k, I print 1 additonal page and file size goes to 6M, what would cause this (graphics are same on all pages)

    I print 2 pages to pdf and file size is 600k, I print 1 additonal page and file size goes to 6M, what would cause this (graphics are same on all pages).
    I know the colour graphic shading in the document that causes the issue of larger file size, but it doesn't make sense that printing 1 additional page with same information as first 2 pages would cause this.

    I print 2 pages to pdf and file size is 600k, I print 1 additonal page and file size goes to 6M, what would cause this (graphics are same on all pages).
    I know the colour graphic shading in the document that causes the issue of larger file size, but it doesn't make sense that printing 1 additional page with same information as first 2 pages would cause this.

  • Aperture is exporting large file size e.g. original image is 18.2MB and the exported version (TFF 16 Bit) is 47.9MB, any ideas please

    Aperture is exporting large file size e.g. original image is 18.2MB and the exported version (TFF 16 Bit) is 47.9MB, any ideas please

    Raws, even if not compressed, Sould be smaller than a 24-bit Tiff, since they have only one bitplane. My T3i shoots 14 bit 18MP raws and has a raw file size of 24.5 MB*. An uncompressed Tiff should have a size of 18 MP x 3 bytes per pixel or 54 MB.
    *There must be some lossless compression going on since 18 MP times 1.75 bytes per pixel is 31.5MB for uncompressed raw.

  • The file size of selected file in input file control is shown as 0 for multiple file selection in Safari 5.1

    The file size of selected file in input file control is shown as 0 for multiple file selection in Safari 5.1. If you select single file, then it is able to return file size correctly. However, if you select multiple files, then the file size of each of the selected file is always returned as 0 from javascript. This works correctly in Safari 4.0 but it does not work in Safari 5.1.
    How do I get the correct file size in Safari 5.1 ?

    If you want to post (or send me) a link to the lrcat file, I'd take a look at it for you, and give you a break-down what's consuming all the bytes. But it might be fun to learn how to do that yourself (e.g. using SQL). I use SQLiteSpy, but other people have their favorites.. (or you can use a command-line client if you prefer..). One way: just run "drop table "{table-name}" on each table then look at filesize (do this to a copy, not the real thing).
    Anyway, it's hard to imagine keywords and captions etc. taking much of the space, since even if you had 1000 10-character words of text metadata per photo average that still only adds up to 117MB, which isn't a substantial portion of that 8G you're seeing occupied.
    Anyway, if you've painted the heck out of most of them and not cleared dev history, that'll do it - that's where I'd put my money too...
    One thing to consider to keep file-size down:
    ===================================
    * After reaching a milestone in your editing, take a snapshot then clear edit history, or the top part of it anyway (e.g. leave the import step), using a preset like:
    Clear Edit History.lrtemplate
    s = {
        id = "E36E8CB3-B52B-41AC-8FA9-1989FAFD5223",
        internalName = "No Edit",
        title = "Clear Edit History",
        type = "Develop",
        value = {
            settings = {
                NoEdit = true,
            uuid = "34402820-B470-4D5B-9369-0502F2176B7F",
        version = 0,
    (that's my most frequently used preset, by far ;-})
    PS - I've written a plugin called DevHistoryEditor, which can auto-consolidate steps and reduce catalog size - it's a bit cumbersome to use a.t.m. but in case you're interested...
    Rob

  • Cannot open a a file with a specific file name

    I have 1 person who cannot open or save a file with a specific file name on his computer.  If he does it at another computer he is fine, no one else has this issue.  The error he gets when trying to open the file is { Cannot create file:missingperson.pdf. Right-click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder}
    Any ideas on how to resove this.  He gets this file sent to him on a regular basis, and cannot have the file name changed.
    Thank you

    I have run across something similar.  Assuming that this PDF they are getting through email is the same name, then this is how I fixed my problem.
    When you get a file in an email and open it, it writes that file to the Temporary Internet Files folder.  Lets assume the file name is filename.pdf  If you open a file from email with the same name at a later time, it creates a file called filename(1).pdf.  Open a file with the same name again, it creates filename(2).pdf, and so on.  Once you get to filename(99).pdf, it will start giving you a lot of trouble.  When I cleared out those filename.pdf's, everything went back to normal.
    Hope this helps.

  • File error: the specific file is locked

    I got the error 'File error: the specific file is locked', when trying to render a project in FCP 7. The rushes and scratch disk are on an external hard-drive. I then went on to finder and I am unable to put anything new onto this external hard-drive. I am now trying to back up everything off the hard-drive and will go to disk utility and try repair it and I have saved the FCP project elsewhere.
    However there is a lot of footage to back up (probably should have done this already), does anyone know of a quick work-around for this or would could be the cause to save it from happening in the future?
    Cheers,
    Martin

    try moving your scratch disk in fcp system preferences to another drive.   Could just be a problem with fcp being unable to write to the drive.

  • Decreasing file size on .wmv files

    I have a Premiere Pro project that consists of an audio file that is 8 MB and about 12 JPEGs which total around 5 MB. When I export to a .wmv, using the Windows Media format and the NTSC Source to Download 512kbps preset, the file size ends up being about 100 MB.
    I created files in Elements that had the same size of content, where the wmv file was less than half the size the I'm getting out of Premiere Pro. I'm guessing it's just my lack of understanding of the software?
    What I need to do is create a video that is usable by a large audience (which is why I chose wmv, but I'm not set on that format) and is smaller than I'm currently creating (preferably around 50 MBs).
    Any suggestions?
    Thank you,
    Darren

    Stanley - thanks for the quick response. Unfortunately, I don't know exactly how to answer the question. Maybe if I give a more detailed account of my project, it will help.
    I recorded an MP3 via a microphone through Audacity. I made the Audacity project, then chose "Export as MP3".
    I then took a Powerpoint I had previously created, and did a "Save as" and chose JPEG as the file type. This saved each slide as a JPEG (about 12 total slides).
    I first imported the audio file into Premiere and then imported the 12 slides.
    As I listened to the audio, I lined up the length of each powerpoint slide with the audio portion pertaining to it. At the end, I had the combined visuals lasting the length of the audio, with each slide showing as long was appropriate.
    Then in Premiere, I clicked on the Timeline window, then selected File>Export>Media...
    In the Export Settings window, I have the following setting (on the right half of the window):
    Format: Windows Media
    Preset: NTSC Source to Download 512kbps
    Comments: NTSC Source to Download 512kbps
    And then of course the Output name, and the boxes for Export video and export audio are checked.
    At the bottom of the Export Settings Window, it says Estimated File Size: 246 MB.
    The file ends up being about 100MB.
    I hope that helps, and that it isn't too much information. Again, thanks for the quick response.
    Darren

  • File size of .swf files exported from Indesign CS5

    I have made a basic file (728 x 90 px) in Indesign, which is the size of banner ads we produce. I have not put on any effect or animation yet. When I export it as a swf file, the file size is 139kb. This is way too large for any banner advertising on websites where the highest is normally 100px and the smallest is 30kb.
    I have tried exporting at a lower resolution, but it has no effect on the file size, rendering this useless as a flash export option for me.
    Is there something I'm missing or is Indesign just not the right tool for flash banner ads.
    Thanks

    Mr Met
    {swf file that's 13MB. What are your images, 200MB each?}
    As I said, I resampled the images to be 500px wide so each PShop image is about 1.4mb (single layer). There are 12 images used.
    Here it is if you care to see i t- 11mb so it will take time to load
    http://wgdesigngroup.com/10/elaine/elaine.html
    Jongware
    {The Right Tool for the Right Job ...}
    No doubt you are a 100% right here.
    But I think it is a bit disingenious to blame the InDesign user for the feature. It would be like Abobe putting Drop Shadows and transparences into ID and then saying you should use PhotoShop to for that feature!
    Brian

  • How to minimize the file size of a file with drawing markups

    Scenario:
    I need to turn a sample of a report into a report template, so I am deleting as many objects as I can with the Tools>Content>Edit Object.  For text that I cannot delete that way, I am covering it up with a white box (Comment>Drawing Markups>square and setting outline = white and fill = white).  On this particular PDF, there are about 20 of these white boxes.  I'm then using Preflight>Flatten annotations and form fields to flatten all of the markups.
    Problem:
    Unfortunately, even after using Preflight and Save As>Reduced Size PDF, the file size is still over 900 kb.  The original file size before I make any changes is less than 150 kb.  I need the final file size to be 200-300 kb.
    Settings:
    Windows 7
    Adobe Acrobat X Pro
    Solutions?
    I may be going about this all wrong, so any advice you have is much appreciated!  The only other thing I can think of to do (since I can't get a blank sample report), is to recreate the report in Word and then PDF it.  I'm hoping there's a better solution.  I tried Photoshop first and the file sizes were in the MBs, so I switched to Acrobat.  Maybe a different program would work even better?

    Basically that is what Bill is telling you. The best method is to:
    create the design of the form in Word.
    Save as a PDF (on a Mac the best method is to go to print menu click pdf and hold mouse or track pad button down, and Chose Adobe PDF) .
    Then open PDF in Acrobat
    Click on Tools
    Click on Forms and create form. Either letting acrobat create the fields and add or take away fields as need.  Or create fields manually.
    This way should you need to make correction you can open the original Word Document, Make chages save as PDF The in open original in PDF. Click on Tools > Pages and choose replace pages and replace desired page(s) as needed. Then readjust fields if needed or add or take fields as needed.

  • Time Machine file size vs actual file size of Aperture library

    My Aperture database is 74.5GB.   I have a referenced library.   My photos are backup up on their own using Time Machine.   I also use Time Machine to backup my Aperture database.   However, I noticed yesterday that the Aperture filesize on my time machine backup is only 28.3GB.   I need to upgrade my hard drive and had planned to just restore form time machine backup, but I am worried about losing Aperture data.   Does anyone know why there is a discrepency?
    -Debbie

    Johnk93 wrote:
    MacDLS,
    I recently did a little house-cleaning on my startup drive (only 60Gb) and now have about 20Gb free, so I don't think that is the problem.
    It's probably not a very fast drive in the first place...
    I know that 5MB isn't very big, but for some reason it takes a lot longer to open these scanned files in photoshop (from aperture) than the 5MB files from my camera. Any idea why this is?
    Have a look at the file size of one of those externally edited files for a clue - it won't be 5MB. When Aperture sends a file out for editing, it creates either a PSD or an uncompressed TIFF after applying any image adjustments that you've applied in Aperture, and sends that out. Depending on the settings in Aperture's preferences this will be in either 8-bit or 16-bit.
    As a 16-bit uncompressed TIFF, a 44 megapixel image weighs in at a touch over 150MB...
    Ian

  • Input file size limition in File Reader Adapter

    Hi,
    We have a File Read Activity(using File Reader Adapter) which works on a Polling model. Whenever a input file is found in a designated directory it invokes our BPEL web service. During load testing we found out that if input file size exceeds 7 MB then we get "insufficient heap space" error. We found a reference to this size limitation in http://download.oracle.com/docs/cd/E11036_01/integrate.1013/b28994.pdf which has below lines..
    "Files that are 7MB or larger in size cannot be delivered. As an alternative, you can debatch large files (if they have multiple messages), and publish these files in messages of size less than 7 MB. This alternative is applicable only to structured files (comma-delimited or fixed position), which contain more than one message. It is not applicable to binary or XML files."
    Our customer will have the data in XML format and the size of the files will be pretty huge(running into 49, 69 MBs). Do we have any workaround here or we are left with no option but to ask the customer to split the files and load it? The later option is currently difficult one for the customer since when split there is a possibility of XML becoming invalid. Any pointers in this issue is appreciated.
    Thanks!
    Balaji

    Hi,
    BPEL can not process more than 7 MB size xml structred file. but,debatching will work for xml files also provided if the file has repeated multiple structures (means multiple repeated root elements).
    Regards,
    Dhanumjay

  • Reg: File size in receiver file adapter

    Hi all,
    I am doing a proxy-> Flat file scenario. The output file size is nearly 15MB.
    Can anyone please tell me whether file adapter in PI 7.1 can write this much big file?
    or do i need to split it in integration engine?
    Regards
    Jagruthi

    Hi Jagruthi,
    >>The output file size is nearly 15MB.Can anyone please tell me whether file adapter in PI 7.1 can write this much big file?
    Yes it can, provided there is less load on the server and the interfaces running are minimal. Also the frequency of this interface should be very less
    >>or do i need to split it in integration engine?
    If possible try to split records and create file be appending
    Regards
    Suraj

  • Is there a free way to reduce file size of .avi files for web?

    i'm looking to reduce my .avi file sizes so i can upload them on a website for sharing or to email them and i don't want to buy anything. is there a shareware app anyone knows of or an application in Tiger that i don't know of? or does imovie offer save as options? for web? i know i could upgrade to the full version of Quicktime but really don't want to fork out the money for that.
    thanks,
    kim

    http://www.isquint.org/

  • Get the file size of a file on the server.

    okay.. for my download manager i need to get the file size. I tried using the available method of inputstream, and the getContentLength() of URLConnection, which worked but only for webpages. so does anyone know how to do this? Sun does it in SDM, but i dont think the source is included. ill download it again and check.
    thanks.

    content-length is not guaranteed to be anythingi dont think so. correct me if i am wrong..
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#s
    c4.4 states -
    " When a Content-Length is given in a message where a
    message-body is allowed, its field value MUST exactly
    match the number of OCTETs in the message-body.
    HTTP/1.1 user agents MUST notify the user when an
    invalid length is received and detected."
    this sort of guarantees that if a file is being
    downloaded the content-length gives the size of the
    file. i am able to confirm this by sniffing the
    traffic of my download manager.This is only guaranteed if the content length field is present. :-)
    However, looking two paragraphs up:
    'All HTTP/1.1 applications that receive entities MUST accept the "chunked" transfer-coding (section 3.6), thus allowing this mechanism to be used for messages when the message length cannot be determined in advance.'
    There is mechanism built in for cases where the size cannot be determined.
    Regards,
    Bhaveet

Maybe you are looking for

  • How to find most cost-effective fwdg agent at the time of shipment creation

    Dear Friends, I have a requirement of realizing the best cost effective transporter(forwarding agent) in the shipment document. Then how to do using the Transportation functionality of the ERP? There is a scenerio like I want to transport my goods fr

  • Looking for best practice white paper on Internet Based Client Management

    Looking for best practice white paper on Internet Based Client Management for SCCM 2012 R2. Has anyone implemented this in a medium sized corporate environment? 10k+ workstations.  We have a single primary site, SQL server and 85 DP's. 

  • On sleep show white o pink screen, most of the time error on start up win8

    hi i got two compter with the same problem, both are (Satellite S855s5382) 1. On SLEEP, 1. lapotp went i close the laptop and then open it the screen turns white or some times show a pink screen                           2. laptop same problem like t

  • Smart mailbox stopped working

    Smart Mailboxes no longer catching incoming mails that fit the criteria. (the ones that should have been caught/tagged are in the INBOX, but not showing up in the virtual smartmail boxes. And now also, no previously 'caught' emails show up at all if

  • SAPUI5 Caching

    Hello All, thanks for your time in reading this question. I wanted to know if anyone else knew of other options to disable caching on an XS app. I currently have done the following: 1) made sure server caching is disabled following: https://scn.sap.c