Recursively search folders, export to excel all sub-folders. All folders containing ReadMe.txt export contents.

I have a bunch of VBScripts that I created using help from this forum and other forums.  These scripts are for fixing Windows problems, installing software and setting configuration settings. Each script is in a separate folder. Some of the script folders
contain a file called ReadMe.txt that contains info about the script and what it does.  I am trying to document all my fixes so I can share them with coworkers, friends and anyone who needs help. I struggle with the "recursive" feature in VBScript.
I found the Scripting Guy's article on recursive searching and found another article from another website that works really well for listing all folders and subfolders to a CSV file.  I'm having trouble adapting the script.  After it exports the
folder list to the CSV, I need it to go back through the list and for every folder that contains the ReadMe.txt, export it's contents to the row for the specific folder that contains the file.
I've tried several modifications of this script but all my attempts cause the script to Not export the file list.  I cannot get past this problem. Until I do that I cannot even focus on the exporting the contents of the ReadMe.txt file to the CSV file.
Here is the code I have
Dim objFSO
Dim ObjOutFile
'Creating File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Create an output file
Set ObjOutFile = objFSO.CreateTextFile("OutputFiles.csv")
'Writing CSV headers
ObjOutFile.WriteLine("Type,File Name,File Path")
'Call the GetFile function to get all files
GetFiles("H:\0-Fixes")
'Close the output file
ObjOutFile.Close
WScript.Echo("Completed")
Function GetFiles(FolderName)
On Error Resume Next
Dim ObjFolder
Dim ObjSubFolders
Dim ObjSubFolder
Dim ObjFiles
Dim ObjFile
Set ObjFolder = objFSO.GetFolder(FolderName)
Set ObjFiles = ObjFolder.Files
'Write all files to output files
For Each ObjFile In ObjFiles
ObjOutFile.WriteLine("File," & ObjFile.Name & "," & ObjFile.Path)
Next
'Getting all subfolders
Set ObjSubFolders = ObjFolder.SubFolders
For Each ObjFolder In ObjSubFolders
'Writing SubFolder Name and Path
ObjOutFile.WriteLine("Folder," & ObjFolder.Name & "," & ObjFolder.Path)
'Getting all Files from subfolder
GetFiles(ObjFolder.Path)
Next
End Function
Helpful nice guy

Here is a fixed version of your script.  Run it and tell us what errors you are getting.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objOutFile = objFSO.CreateTextFile("OutputFiles.csv")
'Writing CSV headers
objOutFile.WriteLine "Type,File Name,File Path"
GetFiles "H:\0-Fixes"
objOutFile.Close
WScript.Echo("Completed")
Function GetFiles(FolderName)
Set objFolder = objFSO.GetFolder(FolderName)
For Each ObjFile In ObjFolder.Files
objOutFile.WriteLine "File," & ObjFile.Name & "," & ObjFile.Path
Next
'Getting all subfolders
Set objSubFolders = ObjFolder.SubFolders
For Each ObjFolder In ObjSubFolders
'Writing SubFolder Name and Path
objOutFile.WriteLine "Folder," & ObjFolder.Name & "," & ObjFolder.Path
GetFiles ObjFolder.Path
Next
End Function
¯\_(ツ)_/¯

Similar Messages

  • Oracle Applications 11i Export to Excel does not work.

    The export button does not work. When I click on export it says complete but does not bring up a window asking me to save. I have pop up blocker off and the site added to trusted sites. I have tried everything I have found so far but no luck. Help would be much appreciated.....thanks!!!!

    Please post the details of the application release, database version and OS.
    The export button does not work. When I click on export it says complete but does not bring up a window asking me to save. I have pop up blocker off and the site added to trusted sites. I have tried everything I have found so far but no luck. Help would be much appreciated.....thanks!!!!Was this working before? If yes, any changes been done recently?
    Can you reproduce the issue from other browsers/machines?
    Can you find any errors in the database log file?
    Please see these docs/links.
    Troubleshooting Export and Attachment issues in Oracle Applications 11i [ID 338651.1]
    Attachments and Exports, a Troubleshooting Guide [ID 135444.1]
    Export To Excel: How To Activate Debugging? [ID 464469.1]
    How to Troubleshoot Forms Hanging Using Export Functionality [ID 423261.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Troubleshoot+AND+Export&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Troubleshooting+AND+Export&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Export+AND+Excel&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Export to excel functionality in OAF

    Hi,
    I want to know whether it is possible to provide the functionality "Export to Excel" in OAF
    i.e. if user want to export the records from a results table to excel (something similar to the functionality available in oracle apps)
    Rgds,
    -Kamal

    Kamal
    If you want to export all the view attributes values of the VO attached to table region. In that case under table actions you can create a export button type button. While if you want to export only some of the attributes you can go through below link.
    Programmatically implementing Export Button
    Thanks
    AJ

  • Discoverer issues exporting to excel

    i'm using OracleBI Discoverer Viewer Version 10.1.2.48.18 and some users claim that when they try to export to excel they get the following message: The exported document no longer exists. An exported document is not maintained after the first download. If you wish to view the document again, please perform the export again.
    I'm able to replicate the error but only after I export and then I closed the workbook in excel. If I re-run the report I can export but for the users whith the problem they can not even export the first time.
    any idea of what the problem is?

    Hi,
    I am using Discoverer Viewer .....
    Wherein there are few parameters based on which we can drill down to reports
    BUT
    when i click on Export to Excel option it displayin all d reports one after d other
    But can't it display in d same way like hierarchy and allow user to drill down based on parameters
    Any suggestions please....
    Thanks in Advance

  • Export to Excel: Row Auto Height Removed on Data Connection Refresh

    Hi all,
    When I perform a Data Connection Refresh on an Excel workbook exported from SharePoint it removes the row auto height I had in place, hiding valuable information. This is an additional column I added to perform some calculations.
    Any ideas?
    K.
    Personal Blog: http://thebitsthatbyte.com

    Hi Kelly,
    As I understand, you have a SharePoint list and click export to Excel under List tab. Then the list is exported to Excel spreadsheet.
    Generally speaking, all field column width and height keep in the same size when the list is exported to Excel. In Excel, under PAGE LAYOUT tab > Scale to Fit, make Width and Height to be Automatic and Scale to 100%.
    Then the cell should be good. If there is some column still exceed the width of Excel cell, please right click the cell > Format cells > Alignment > Text control, click Wrap text to increase the cell size to fit the text, or click Shrink to fit
    to shrink the text.
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Export in Excel format

    Hi,
    I tried to export the report (crystal report) to excel. Its exporting but the dat format is not exported properly. any suggestion

    Hi,
    Well, yes this can be hair-puller and no matter how much you try, you might still end up disappointed!
    Most of the times it's because of the way the report is designed. Use the guidelines if you're designing a report that would be exported to Excel.
    Make sure all the fields on the details section or on the other sections are evenly spaced and their dimensions are the same.
    Subreports can add to the frustration as they normally tend to create blank cells, rows or columns - Can't do much about it!
    There are two Excel export formats - Excel and Excel (data only). See which one produces the best output.
    Good Luck!
    -Abhilash

  • Export to Excel without Attachments in SharePoint Server 2010 Libraries

    Hi All.
    In SharePoint Server 2010 Libraries, when i use "Export to Excel" button from ribbon, all item's attached files link also appear in excel worksheet file.
    What can i do to prevent this?

    It might be a couple which you can easily delete
    By design, you can only export items and if you plan to export attachment or attachment url's. See some ref links here:
    http://kbochevski.blogspot.in/2012/01/export-splist-with-attachments-openxml.html
    http://blog.furuknap.net/exporting-sharepoint-lists-to-excel-including-attachments
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/

  • How to Audit the Report which is Export to Excel and PDF

    Hi All,
    Is there any way that we can audit the report which is exported to Excel or PDF and what data the user is exporting to his local computer.
    We can audit the scheduled report with output Excel or pdf but i am not sure about the audit for report export activity to excel and pdf.
    Thanks & Regards,
    Rahul Akurathi

    Hi,
    You said that you have a new request number when you changed the program in Dev. Release that request and ask your Basis guys to move that transport to Testing Client. The program will be automatically updated in the testing client with the changes you have done in Dev when the transport gets imported in testing.
    Reward if useful.
    Thanks
    Aneesh.

  • Oracle BIEE export to excel

    Hello everyone.
    I'm having troubles exporting an excel file from an oracle BIEE analysis.
    Once the file is saved, the data have nothing to do with what I see in the analysis.
    Could it be an issue due to the combination of commas, percent symbol and dots
    that have a different meaning in BIEE and excel?
    Is there a way to change some settings? Because so far the only thing I did is to hit export->excel
    Thanks in advance for your help. Have a good one.
    Agata

    Please post the details of OBIEE version and the Excel version you are using.
    Is the issue with one file or all files?
    There are many issues with Excel AND OBIEE reported on MOS website (as you see below) so it would be more helpful if you could provide more details.
    Downloading to Excel 2007 from OBIEE 10.1.3.4 The File you are Trying to Open is in a Different Format than Specified by the File Extension - Contains Features not Compatible [ID 980627.1]
    Obiee 11.1.1.5 - Export To Excel Issue [ID 1333391.1]
    OBIEE 11g: When you Export a Pivot Table to Excel, the Decimal Format is Lost [ID 1479859.1]
    OBIEE 11g: When Exporting OBIEE Reports to Excel, Numeric Columns with Action Links Have a Trailing Space [ID 1363474.1]
    Thanks,
    Hussein

  • Cross-Tab Report export to Excel

    I have a cross-tab report that I need to export to excel and keep the same formatting.  When I export the report the first column is Part # the next is operation #.  The report is grouped on Part number, but each part may have multi operation.  When I look at the report in Crystal or as a PDF the part # is at the top then each operation is a seperate row that follows.  When I export it to excel it works fine but instead of the part # appearing at the top then follow by each operation the part number ends up on the last operation in the list.  How can I export this and keep the format the same?  by the way I have tried both xls data only and xls 2007 options

    Hello Experts,
    I also tried to export the CR cross tab report in Excel Data only format.
    Also I want to display Row label i.e. my Rows are different dates so I created a text field and named as Date & Time but when export it to Excel Data Only, the date time label appears 1 row above then rest of the columns. It works good while looking on InfoView but export messed it up.
    Can you please suggest.

  • Export to Excel - WAD with 2 tabs

    Hello
    I've got a WAD with a container which contains 2 tabs
    Container 1 is linked  to the first tab
    Container 2 is linked to a second tab.
    There is one query on each tab.
    When we export to Excel one tab, Excel shows technical ID of the WAD.
    Is there a possibility to display title of the tab instead of WAD techincal ID ?
    Thanks & Regards
    Catherine

    Hi Catherine,
    This is a Tricky question.......
    Let say you have placed Container1(which has some data) under Tab1 and Container2 under Tab2 and Export to Excel.
    Now if you perform Export to Excel for Container1 data,then the data will be exported into Excel where the name of the tab(Tab1) won't be displayed as a worksheet name in Excel.It will always show Name of the Web Template and not the tab name.
    So whatever you seen is as expected.You can't export a web template which has multiple tabs into Excel with the same way as it shown in web.
    Hope this clarifies you.
    Rgds,
    Murali

  • Unformatted Export to Excel

    Hi,
    Im new to OBIEE, earlier we were using SSRS and now we are converting the same reports in OBIEE. Our reports has huge volume of data and for that we used Unformatted export to excel option. Is there's a way to export the data without any formatting (Fonts/Gridlines)
    Your help would be much appreciated..
    Thanks in advance,
    Mohan Kumar.V

    We have the same problem. Our reports often have more than 10,000 lines. Don't even bother trying to get BI Publisher to help you with this issue. Recommend creating views in your database and letting your users connect to them directly from Excel via ODBC.
    BIP 11.1.1.5 does not actually support true Excel 2007 format. Yes, they advertise it, but it's a lie.

  • Exporting to Excel data only using sub reports in Crytal 9

    Post Author: pmstar
    CA Forum: Exporting
    I am using Crystal 9 verision.
    I have .rpt file that used 4 sub reports .In the main report I placed all the sub reports in the(detail section) row  and using the data for some caluculation in the main report to generate report fields.I placed the main report fields in next row( in detail section).However when i export the report .Its generating 5 empty rows  and 3 rows with 0. I have pretty much followed the solution from the article "c2017620" published in BO.
    Since i used the sub reports only to get some value for main report calculations .Is there any workaround for the following issue
    1.I do not want to print the subreport data when exported to excel data only.
    2.how can i get rid of the blank rows
    We have a lot of reports which has the same issue and we need to get the reports to work in Excel Data only .The reports works perfect when used in PDF format but its mandatory that we need to give the reports to the client using Data only.
    If possible, when responding with your recommendations, please include detailed steps.  It would be very helpful.Thanks in advance,
    PM

    Post Author: swat
    CA Forum: Exporting
    Hi,
    Of what i gather from ur scenario...this is what i did in one of my reports.
    I had to use two subreports and they had to occupy one cell each, in line with other fields.
    To obtain that,all the fields required in the subreport i put them into a text box.Therein restricting the fields to the txt box only...
    Then import that sub-report as it is.
    It worked for me....
    try out...
    All this only if've understood u right...

  • Export to Excel Action in MS SSRS Report not exporting all data in Report

    Hi,
    I have developed a complex Report that has many expandable nodes in a table format. The report works fine.
    However, when I export the Report to Excel using Actions --> export to Excel, only the data in expanded nodes is included. The data in collapsed nodes is not included.
    I am looking for approach to include data in expanded nodes in Excel Export. The expanded data can be expanded in Excel.
    Any help in this regard will be appreciated.

    Hi Abhijit PS,
    Per my understanding you are experiencing the issue with the excel report which have add the drill down action, after export to excel only the expanded nodes included and the collapsed nodes is not shown, right?
    Generally, if we expand the nodes before export to excel then the excel will display the expanded details row and keep collapsed the details row which haven't expand, but we have the toggle "+","-" on the left of the Excel to help
    control the expand and collapse, when you click the "+" you can expand the collapsed notes to see the details rows.
    I have tested on my local environment with different version of SSRS and can always see the "+","-" as below:
    On the Top left corner you can find the "1","2", this help to control the "Collapse All" and "Expand All".
    If you can't see the "+","-" in the excel, the issue can be caused by the Excel version you are currently using, and also excel have limit support of this, please provide us the Excel version information and the SSRS version. You
    can reference to this similar thread:
    lost collapsing columns when export to excel
    Please try to export other drill down report to excel and check if they work fine, if they did, the issue can be caused by the drill down action you have added in this report is not correctly, if possible, please try to redesign the report.
    Article below about how to add  Expand/Collapse Action to an Item for your reference:
    http://msdn.microsoft.com/en-us/library/dd220405.aspx
    If your problem still exists, please feel free to ask
    Regards
    Vicky Liu

  • Exporting to Excel from Aria People Search

    Is it possible to export to Excel from Aria People Search.
    I would like to output the Org Chart (built in) and the Tree (I created) to an Excel file.
    Does anyone know how to do this?
    Thanks,
    Tom

    Hi,
    If you are using 10g, then OLE2 is supported. However, it will be executed in the App Server Machine.
    If you want to do the operation in the Client machine (as how it was done in the Client / Server), you need to use Client_OLE (Which is part of WebUtil).
    Look at
    http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
    for more details on WebUtil.
    HTH.
    Regards,
    Arun

Maybe you are looking for

  • JSP Debbuging -Error: 'class' or 'interface' expected-

    Hi, Does anybody know why am I getting the following error when trying to either debug or run a JSP? Error: 'class' or 'interface' expected This happens with JDeveloper 9.0.2.829 It was running just OK, when running from the Navigator Panel (Right cl

  • FREE_SELECTIONS_DIALOG in a Tabstrip

    Dear Experts, I have been searching for help, but I couldn't find any helpful discussion so far. I know we can generate full screen or popup screen using FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. My question: Is it possible to generate dynamic

  • Update Query for Object Table

    Hi All, I have table column defined as user defined data type. That User defined data type contains many columns. My requirement is i want to update one particular column of that User defined data type column. How should i update. Pls help me. I am u

  • Extending one Region Controller but need hold button id in Another Region

    Hi All, I am extending one Region() Controller.But i need to get control to a Button in a different region(Page Button Bar: (EffDateFooterRN)). I tried to use PageLayoutBean as well as OASubmitButtonBean but it is returning null. Can anyone help on t

  • Adobe Acrobat XIStandard does not open?

    I get an error message that a more functional version is installed and the installation aborts.