Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Script to report on folder modified date, i have attached mine but need to modify so it only goes down 1 level

Posted on 2011-03-04
8
Medium Priority
?
687 Views
Last Modified: 2012-05-11
Hi All

I have a script (i have attached as a .txt file) this script reports on last modified date of folders including all sub folders and files.

I need to modify it if possible to i have two versions

Version 1 (this is what i need)

Firstly i would like to change it so it only goes down 1 level of subfolder, for example i will run this on "E:\Users" folder and i only want to it to report on the level directly below that which are my users individual folders,

Version 2 ( this one is just a nice to have and not critical)

I would like the same script to report on all subfolders but not any files.

Thanks

Nick






 report-file-properties.txt
0
Comment
Question by:ncomper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 2

Expert Comment

by:Chris Walsh
ID: 35035690
Try this code.  I have added two new parameters to your ReportFiles() function which accept a boolean value (True or False) as to whether you want Folders only or not and a numeric value nLevels which allow you to state how many levels you want to go down. report-file-properties.asp.txt
0
 
LVL 2

Accepted Solution

by:
Chris Walsh earned 2000 total points
ID: 35035723
Sorry, you need to add the Attribute constants to the top of the code... only FileAttrDirectory  is being used through.  use this version...
 report-file-properties.asp.txt
0
 
LVL 5

Author Comment

by:ncomper
ID: 35035759
Hi

Thanks for that, im getting an error when i try to run, line 76 Char 26, Syntax Error, Code 800A03EA

Any Ideads why?

Thanks
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Expert Comment

by:Chris Walsh
ID: 35035769
Line 76 is a blank line (unless you have modified the file).  HOw are you running it?  In an asp website?
0
 
LVL 5

Author Comment

by:ncomper
ID: 35035847
Hey

I just renamed it to a .vbs and double click, i didnt see the 2nd post you made so i was running the first file you attached, also it was line 78 char 26

Thanks

Nick

0
 
LVL 2

Expert Comment

by:Chris Walsh
ID: 35035862
Are you all sorted?  if so, can you flag my 2nd answer as the solution.  That will me get some points.  Thanks.
0
 
LVL 5

Author Comment

by:ncomper
ID: 35036555
Yeah will do that now cheers, if you do get a spare 5 mins to stop it doing files and just reporting folders that would be a bonus, no worries if not though as this has allowed me to get on.

Thankss again
0
 
LVL 5

Author Closing Comment

by:ncomper
ID: 35036561
Excellent Thanks
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question