Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 To: Yehuda Epstein
  Where is Yehuda Epstein?
 Monsey
 New York - United States
 Yehuda Epstein
 Tags
Subject: RE: Files modified date
Thread ID: 188996 Message ID: 189015 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Wednesday, August 13, 2008 12:22:04 AM         
   


> Hi to all,
> It is sad to hear about Ken. He succeeded in helping me & many others. May his help & patient be remembered.
>
> I currently need help if possible, regarding copying files from a directory with a modified date >= to a certain date. The question is how do I write code to identify which files in this directory are >= to that date. I am already familiar to an extant with ADIR, which enables me to pass a file's modified date to a variable, but in this case we deal with many files with different changing names, which the only common denominator is their modified date, among other files with a different modified date.
>
> Can anyone help?
> Thanks in advance.

Hi
I give you a program below(scripting), can works and outputs in a cursor all the informations like name,folder,size,dates created,last access,last modified,attribute,type. It scopes any folder on disc.

create cursor ycurs (num n(4.0), PATH c(70),nom c(70),type c(10),attribut c(1),DateCréation c(10),Datemodif c(10);
,DateAccess c(10),size c(12) )

oFolder = GETDIR()
ShowFileAttr=""
FolderInformation(oFolder)

FUNCTION FolderInformation
   LPARAMETERS loFolder
   #DEFINE yRL "<BR>"      
   PUBLIC  lcText
   LOCAL lcSubFolders
   LOCAL lcSubFolder
   LOCAL lcFiles
   LOCAL lcFile
   jj=0
   FSO = CREATEOBJECT("Scripting.FileSystemObject")
   lcFolder = FSO.getfolder(loFolder)
   lcText = "Répertoire:" + lcFolder.PATH+ yRL+ yRL
   lcFiles = lcFolder.FILES
   
   IF lcFiles.COUNT =1
      lcText = "Il y a 1 fichier " + yRL
   ELSE
      lcText = lcText+ "Il y a " +TRANSFORM(lcFiles.COUNT)+ " fichiers" +yRL
   ENDIF

   IF lcFiles.COUNT <> 0
      FOR EACH lFile IN lcFiles
      jj=jj+1
         FileInformation(lFile)
      NEXT
   ENDIF
   brow
 
FUNCTION FileInformation
  LPARAMETERS lcFile
sele ycurs
appe blan
repl num with jj
if len(path)>67
repl path with allt(lower(lcfile.path))+"..."
else
repl path with allt(lower(lcfile.path))
endi

if len(lcfile.name)>67
repl nom with allt(lower(lcfile.name))+"..."
else
repl nom with allt(lower(lcfile.name))
endi


repl type with lcfile.type
repl Attribut with ShowFileAttr(lcFile)
repl DateCréation with DTOC(lcFile.DateCreated)
repl DateModif with DTOC(lcFile.DateLastModified)
repl dateaccess with DTOC(lcFile.DateLastAccessed)
repl size with TRANSFORM(lcFile.SIZE)
ENDFUNC

FUNCTION ShowFileAttr
   LPARAMETER llcFile
   ATTR = llcFile.ATTRIBUTES
   DO CASE
      CASE ATTR = 0
         ShowFileAttr = "Normal"
      CASE ATTR =1
         ShowFileAttr = "Read-Only"
      CASE ATTR  = 2
         ShowFileAttr = "Hidden"
      CASE ATTR  = 4
         ShowFileAttr = "System"
      CASE ATTR  = 8
         ShowFileAttr = "Volume"
      CASE ATTR  = 16
         ShowFileAttr = "Directory"
      CASE ATTR  = 32
         ShowFileAttr = "Archive"
      CASE ATTR = 64
         ShowFileAttr = "Alias"
      CASE ATTR = 128
         ShowFileAttr = "Compressed"
   ENDCASE
   RETURN ShowFileAttr
ENDFUNC


Regards
Yousfi Benameur

ENTIRE THREAD

Files modified date Posted by Yehuda Epstein @ 8/12/2008 10:05:37 PM
RE: Files modified date Posted by Yuri Rubinov @ 8/12/2008 10:17:55 PM
RE: Files modified date Posted by Yehuda Epstein @ 8/12/2008 11:21:40 PM
RE: Files modified date Posted by Yuri Rubinov @ 8/13/2008 2:20:14 AM
RE: Files modified date Posted by Yehuda Epstein @ 8/13/2008 5:35:12 PM
RE: Files modified date Posted by Yousfi Benameur @ 8/13/2008 12:22:04 AM
RE: Files modified date Posted by Cetin Basoz @ 8/13/2008 12:55:38 PM
RE: Files modified date Posted by tushar @ 8/13/2008 2:57:04 PM
RE: Files modified date Posted by Samir Ibrahim @ 8/13/2008 5:18:06 PM