VBScript to read the content of a .csv file and delete old files mentioned in the .csv

I have a Windows 2003 file server.
I have generated a report in .csv format, about the files which are older than 1 year.
I need a VBScript to read the .csv file and delete the files which are enlisted there.
Can someone please help me with this?

Look into the "Learn" link above.  There are resources and instructions on how to write VBScript code.  Look into how to use the FileSystemObject.
¯\_(ツ)_/¯

Similar Messages

  • Problem with Read-only user being able to add and delete files and folders.

    The setup:
    Computer #1
    iMac (intel) running 10.5.5
    File sharing ON
    Sharing folder on external USB drive called 'iTunes' (but not the drive volume itself)
    Users:
    - Everyone = Read Only
    - Admin(me) = Read/write
    - UserA = Read Only (with account PW and username identical to local login for computer below)
    Computer #2
    UserA's iBook G4 running 10.4.11
    When I go to finder>network>iMac>connect it prompts me to login which I do and then select 'iTunes' folder which is visible and mounts successfully. I can see all files, access them all. Life seems great. Then I discover that I can also modify and delete files from the iBook, and create and delete directories.
    I'm new to networking and although I've setup and managed minimal networking tasks on PCs before, this is my first foray into the Mac networking world. Please help.
    What am I doing wrong? What haven't I set?
    Thanks in advance.

    Sorry, I should have clarified this in the first email.
    When I login from the iBook, I am logging in under a read-only user (not as myself, who is admin on the iMac). The user on the iBook has only been given read-only permissions on the iMac yet is able to add and delete files.
    This read-only login/PW however, is the admin account on the iBook, but that shouldn't allow this person to write on the iMac so far as I understand things...right?

  • I had the icloud account changed on the iPad (have added new ID and deleted old one). However when updating/downloading , it still asks for password to the previous account...?

    I’m giving my ipad to my sister and I had the icloud account changed. I have added new ID and deleted the old one. However when updating and downloading apps, it still asks for password to the previous account. Does anyone know how to fix this? Thanks very much!

    Maybe you should set it up as new device again:
    How to back up your data and set up as a new device
    Apps are tied to the Apple ID they were bought with and can not be shared with other devices that have a different Apple ID.

  • Read specified content of a xml file

    How to get specified part of a xml file
    This is the content of the xml file, I just want the content in the <body>...</body> without the <p></p> tag. How can I do that?
    <?xml version="1.0" encoding="UTF-8"?>
    <TEI.2>
    <teiHeader>
    <fileDesc>
    <titleStmt>
    <title>Pastikan kita terus bebas -- PM: Kekalkan perpaduan, jangan terpengaruh dakyah asing di alaf baru
    </title>
    <author>MOHD. NOR AB. SAMAD
    </author>
    </titleStmt>
    <publicationStmt>
    <publisher/>
    </publicationStmt>
    <sourceDesc>
    <!-- ... -->
    </sourceDesc>
    </fileDesc>
    <profileDesc>
    <textClass>
    <catRef target="Muka_Hadapan"/>
    </textClass>
    </profileDesc>
    </teiHeader>
    <text>
    <front>
    <!--
                      front matter ...
                 -->
    </front>
    <body>
    <p>- Datuk Seri Dr. Mahathir Mohamad mengajak rakyat supaya mengekalkan perpaduan dan belajar daripada sejarah negara serta tidak terpedaya dengan dakyah asing bagi memastikan Malaysia terus bebas, merdeka dan maju pada alaf akan datang.</p>
    <p>Sambil mengingatkan mereka usaha menjajah semula negara masih diteruskan oleh bekas penjajah, Perdana Menteri berkata, kemerdekaan negara tidak akan kekal selama-lamanya jika rakyat mengabaikan perkara tersebut.</p>
    <p/>
    <p/>
    <p/>
    </body>
    <back>
    <!--
                      back matter ...
                 -->
    </back>
    </text>
    </TEI.2>

    I can get the first <p> tag only. How to get others <p> tag content?
    How I know how many <p> node that it have if i use while loop?
         public static String ParserWord(String pathname, String tag) {
                Text result = null;
                try{
                  DOMParser parser = new DOMParser();
                    parser.parse(pathname);
                    Document doc = parser.getDocument();
                    NodeList doubles = doc.getElementsByTagName(tag);
                    Node datum = doubles.item(0);
                    result = (Text) datum.getFirstChild();
                 catch (Exception e) {
                  System.err.println(e + "cannot parse");
             return result.getNodeValue();
           }

  • Changed feed and deleted old account.  iTunes Store still showing deleted content?

    I was a former use of Podomatic and published my RSS feed to iTunes in order to publish my podcasts.  I am now publishing to iTunes direct from my webserver via software "Feed For All" that I purchased.  iTunes approved the changed URL RSS feed and it's working fine in the iTunes store.  All that is available via the Feed for All URL is being published by iTunes, so that's not the problem.  The problem lays in that I deleted my Podomatic account approximately 7 days ago, and iTunes Store still shows the Podomatic content ... i.e., unplayable and not working podcasts as well as the avatar from my Podomatic account. 
    How long does it take for iTunes to strip out the old Podomatic stuff?
    Thank you.
    Rachael

    His content will only be where he put it.
    Has he copied his content from his old comptuer to the new one?

  • For the last 2 days firefox will not start on my mac desktop have to force quit several times, getting 'not responding' message, already restarted computer 3 times plus reuploaded firefox from safari and deleted old, what is wrong?

    can't start firefox, keeps getting stuck have 'no response' have to force quit on my mac

    Hmmmm, http://www.seattlepi.com/ loads fine hear in 10.4.11, FF 3.6.8, but I do see it uses some kind of Flash.
    The last really supported Flash for PPC was 10.1.102.64, but if it's for like Facebook or such, people have been fooling FB to think they have a leter version installed.
    Texas Mac Man's Flash hack/post...
    https://discussions.apple.com/thread/3599648?tstart=0
    Flash player 11.1 hack on PowerPC - https://discussions.apple.com/message/16990862
    Might be later ones around also... saw 11.3 I think.
    (If you are running a PPC Mac with Flash Player 10.1.102.64 and are having problems with watching videos on FaceBook or other sites, contributor Texas Mac Man suggests the following solution which fools the site into thinking that you are running the latest version:)
    Download this http://www.steelbin.com/FPforFBPPC.zip to your desktop, unzip it, and replace the current Flash Player plug-in which is in your main/Library/Internet Plug-Ins folder, (not the user Library). Save the old one just in case this one doesn't work.
    You should also consider the Shockwave Player, which displays Web content that has been created by Adobe Director, much used for multimedia: For PPC Macs:  http://get.adobe.com/shockwave/
    See in each Browser which version of Flash it thinks it has...
    http://kb2.adobe.com/cps/155/tn_15507.html
    Then Test Adobe Shockwave & Flash Players...
    http://www.adobe.com/shockwave/welcome/

  • Delete content in alert.log file

    hii,
    Presently, i am working at oracle 10g database on windows 2003 server.
    alter.log file size is 432 MB around which take several time time to open.
    so, how can i delete content form alert.log file to reduce size
    Regards
    Vaibhav

    Hi,
    No need to delete contents of alertlog.
    just rename the alert log file or copy to another location and delete old one,then it will automatically creates new alert log file with format alert_<sid>.log
    note:
    no need of database bounce.

  • How to read the entire CSV file content

    Hi All,
    I am using JDBC adapter and i need to send the entire CSV file to the Blob datatype filed.
    How to achive this?
    Thanks
    Mahi.

    Hi Mahi
    So you want to send the content of the entire CSV file to a particular field in data base?
    You can write a java mapping to read the content of the CSV file and then populate the same under the field of the data base.
    If you need help on java mapping then please provide the sample CSV file and the target JDBC structure.

  • How to Read the "text file and csv file" through powershell Scripts

    Hi All
    i need to add a multiple users in a particular Group through powershell Script how to read the text and CSV files in powershell
    am completly new to Powershell scripts any one pls respond ASAP.with step by step process pls
    Regards:
    Rajeshreddy.k

    Hi Rajeshreddy.k,
    To add multiple users to one group, I wouldn't use a .csv file since the only value you need from a list is the users to be added.
    To start create a list of users that should be added to the group, import this list in a variable called $users, the group distinguishedName in a variable called $Group and simply call the ActiveDirectory cmdlet Add-GroupMember.
    $Users = Get-Content -Path 'C:\ListOfUsernames.txt'
    $Group = 'CN=MyGroup,OU=MyOrg,DC=domain,DC=lcl'
    Add-ADGroupMember -Identity $Group -Members $Users

  • Read a csv file and read the fiscal yr in the 4th pos?

    Hello ABAP Experts,
    how to write a code for read a csv file and read the fiscal year in the 4th position.
    any suggestions or code highly appreciated.
    Thanks,
    BWer

    Hi Bwer,
    Declare table itab with the required fields...
    Use GUI UPLOAD to get the contents of the file (say abc.csv) in case if the file is on the presentation server...
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'c:\abc.csv'
       FILETYPE                        = 'ASC'
        WRITE_FIELD_SEPARATOR           = 'X'
      tables
        data_tab                        = itab
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       OTHERS                          = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use OPEN DATASET in case if the file is on the application server..
    After that USE SPLIT command at comma to get the contents of the 4th field...
    Regards,
    Tanveer.
    <b>Please mark helpful answers</b>

  • Reading the context of csv file

    Hi Experts
    I want to read the content of csv file that is avaliable in my desktop, I want to use file upload UI Element to pick the file. Please help me with sutiable code
    Regards,
    Anand

    Hi ,
    You can read a .csv file in the following way :
    BufferedReader in=null;
    InputStream inStream = null;
    IWDResource resource = wdContext.currentContextElement().<attribute name of type resource>;
    inStream = resource.read(true);
    in = new BufferedReader(new InputStreamReader(inStream));
    Collection fileData = new ArrayList();
    //reading the file line by line
    while ((line = in.readLine()) != null) {
           List row = new ArrayList();
           line = line.replaceAll(",","");   // csv file is comma separated file , so that comma's are separated by ''.
           String[] colValue = line.split("~");
    // now you can use for loop to get the values and add it to the value node.
    Thanks
    Ritushree Saha

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • How to read the contents of XML file from my java code

    All,
    I created an rtf report for one of my EBS reports. Now I want to email this report to several people. Using Tim's blog I implemented the email part. I am sending emails to myself based on the USERID logic.
    However I want to email to different people other then me. My email addresses are in the XML file.
    From the java program which sends the email, how can I read the fields from XML file. If any one has done this, Please point me to the right examples.
    Please let me know if there are any exmaples/BLOG's which explain how to do this(basically read the contents of XML file in the Java program).
    Thank You,
    Padma

    Ike,
    Do you have a sample. I am searched so much in this forum for samples. I looked on SAX Parser. I did not find any samples.
    Please help me.
    Thank you for your posting.
    Padma.

  • No music in iTunes library and it wont read the content of my iPod? Help please!

    So I recently updated to iTunes 10.7 and when I did, all of the content in the iTunes library was gone! i have tried many different things to get it to work, like restoring to a previous iTunes library, but it appears that all the previous iTunes libraries were also deleted when I updated! If there is no other way to get the music back than finding the original files and putting them into iTunes, I guess that will be ok.
    The second problem I am having is that when ever I try to sync my iPod it takes a very long time to load, and then it says that iTunes can't read the content of my iPod and that I should restore to the factory settings, but because there is no music or apps in my iTunes library I dont want to do that, because then I will have no way of getting all of my content back on. And I can't restore to a previous backup because it wont read it as my iPod, it just comes up as an unkown iPod. This is very frustrating and I have tried everything I can think of. Please help!

    Try:
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Try another cable and another USB port
    - Reboot the computer.
    - See if you can find the media by:
    - See if a third-party progtam like one of those discussed here will allow you to get the music off the iPod
    newer copy
    - I think you may end up restoring the iPod.

  • "Itunes cannot read the contents of ipod. Go to the summary tab in Ipod preferences and click Restore to restore this ipod to factory settings." What is this?

    I have been getting this error message since about the end of June when I updated to the latest version of iTunes. It's pretty annoying. Let me lay out how this has been happening for the past month, the best I can. I have a 32GB 4th gen iPod Touch
    I load content up to my iPod. Music, Apps, Videos, pictures, etc.
    My iPod works well for a little while, days sometimes a week is the longest I went without seeing this message.
    I connect iPod back to my laptop through the standard pack in Apple USB connector.
    I get the "Itunes cannot read the contents of ipod. Go to the summary tab in Ipod preferences and click Restore to restore this ipod to factory settings." message. When I go to the preferences tab, I click restore and iTunes gets stuck trying to restore my iPod. Then I have to uplug my iPod. And Shutdown/Restart my PC reconnect my iPod, and go through the restore process again.
    I have been doing this for as I said, a month. It's getting pretty grueling to keep havomh putting cotent on my iPod after these restores.
    I've tried everything.
    I've stopped autosync, it still happens.
    I tried to reinstall iTunes(be it I didn't full uninstall before trying to install again and got the option to fix corrupted files and such
    I've deleted all old back up, and it still happens
    Today is the fist time I'm fully uninstalling iTunes, and then reinstalling to see if this works.
    But do you guys have any otehr solutions for this? As I said, this didn't start happening until I installed the lastest version of iTunes 10.6.3

    - Have you tried another cable?
    - Another USB port?
    - When you have the problem, connect it to another computer to help determine if you have an iPod or computer problem.
    - Try just restoring the iPod to factory settings/new iPod. Do not restore from backup. If you still have the problem with this and all computer that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

Maybe you are looking for