[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Get a list of files from the last modified date

Posted on 2004-04-22
7
Medium Priority
?
254 Views
Last Modified: 2010-04-17
I have a folder on a drive called "global",
I want a listing of all files from dir & sub dir
by last mod date .
0
Comment
Question by:CMILLER
[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
  • 2
7 Comments
 
LVL 4

Expert Comment

by:JpmSoft
ID: 10894670
This seems to be very simple... Try this:

Use FileSystemObject to get Files and Folder information...
(Add a reference to Microsoft Scripting runtime an declare it as follows:
Dim FSO As New FileSystemObject)

Then build an array and sort it using a generic array sort routine like this...

Public Sub BubbleSort(ByRef lngArray() As Long)
    Dim iOuter As Long
    Dim iInner As Long
    Dim iLBound As Long
    Dim iUBound As Long
    Dim iTemp As Long
   
    iLBound = LBound(lngArray)
    iUBound = UBound(lngArray)
   
    'Which bubbling pass
    For iOuter = iLBound To iUBound - 1
        'Which comparison
        For iInner = iLBound To iUBound - iOuter - 1
       
            'Compare this item to the next item
            If lngArray(iInner) > lngArray(iInner + 1) Then
                'Swap
                iTemp = lngArray(iInner)
                lngArray(iInner) = lngArray(iInner + 1)
                lngArray(iInner + 1) = iTemp
            End If
           
        Next iInner
    Next iOuter
End Sub

This could help!
0
 
LVL 8

Accepted Solution

by:
harris_c earned 1200 total points
ID: 10896654
0
 

Author Comment

by:CMILLER
ID: 10902836
How do I get either to run, need more guidance
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:CMILLER
ID: 10902980
I copied the text from http://www.annoyances.org/exec/forum/win2000/t1062537093
and created a getfolders.vbs, it worked but here is what I get

Folder 'software' was last modified on Friday, April 16, 2004 at 1:23:25 PM

I need the files also

this global dir has
 
2644 folders
39224 files

so I cant make a text file with all this info, I need a script that will
go through the dir global and output this info

d:\global\dirx\ ( list all files with the date and time last accessed )
d:\global\dirx\

0
 

Author Comment

by:CMILLER
ID: 10953811
jpmsoft,

how do I get this to run?
0
 
LVL 4

Assisted Solution

by:JpmSoft
JpmSoft earned 800 total points
ID: 10953873

Here is an example of how to do this.

http://www.roubaixinteractive.com/PlayGround/FSO/Sort_Folder_Contents.asp?orderBy=DESC&sortBy=Size

in this case, the programmer uses a ADO Recordset object for sorting (wich is not a bad idea) but if you don't want to use ADO, you may use this bubblesort function as I told you before.

Good Luck!
0
 

Author Comment

by:CMILLER
ID: 11000020
Still no luck in creating this script
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Simple Linear Regression

650 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