Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching for compare directories utility
Message
 
 
To
30/11/2001 03:14:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00582535
Message ID:
00587962
Views:
41
>>In DOS we had Norton Commander, I had Windows Commander, but I don't have it here...
>
Hi Cetin,

Thanks a lot for the code sample. Basically, I think Daniel's suggestion would be the best. I'll try to download trial version again (I did it once but it expired since then)...

I have some problems with WinDiff interface...



>FYI NC DOS still works. Also there are far, wincommander etc. I think still windiff is better. NC was doing it based on filename,size and datetime not the content also.
>If NC style would work for you :
>
Gettree(getdir(),.t.)
>browse
>
>Function Gettree
>Lparameters tcDirectory, tlFiles
>Create cursor crsFiles ;
>  (FolderId i, Filename m, FileSize i, Created t, Modified t, Accessed t)
>Create cursor crsFolders (Folder m, FolderId i)
>
>oFS = CREATEOBJECT('Scripting.FileSystemObject')
>oFolder = oFS.GetFolder(tcDirectory)
>Insert into crsFolders ;
>  (Folder , FolderId ) ;
>  values ;
>  (oFolder.Path, reccount('crsFolders')+1)
>If tlFiles
>   GetFiles(oFolder, reccount('crsFolders'))
>Endif
>
>tcDirectory = iif(oFolder.IsRootFolder(), substr(tcDirectory,1,len(tcDirectory)-1), tcDirectory)
>=_SubFolders(oFolder, tcDirectory, tcDirectory,tlFiles)
>select crsFiles
>index on FolderId tag FolderID
>local array arrFolderSize[1], arrFileNameSize[1]
>local lnFolderSize, lnFileNameSize
>
>select max(len(Folder)) from crsFolders into array arrFolderSize
>select max(len(Filename)) from crsFiles into array arrFileNameSize
>lnFolderSize = min(254,arrFolderSize)
>lnFileNameSize = min(254, arrFileNameSize)
>
>select padr(Folder,lnFolderSize), padr(Filename,lnFileNameSize) , ;
>	FileSize , Created , Modified , Accessed ;
>	from crsFolders join crsFiles on crsFolders.FolderId = crsFiles.FolderId ;
>	into cursor crsResult
>
>Function _SubFolders
>Lparameters toFolder, tcPath, tcStartPath, tlFiles
>Local loSubFolders
>tcPath = tcStartPath
>For each oSubFolder in toFolder.Subfolders
>  If oSubFolder.Name # "System Volume Information"
>    Insert into crsFolders ;
>      (Folder , FolderId ) ;
>      values ;
>      (oSubFolder.Path, reccount('crsFolders')+1)
>    If tlFiles
>      GetFiles(oSubFolder, reccount('crsFolders'))
>    Endif
>    =_SubFolders(oSubFolder, tcPath, tcPath+"\"+ oSubFolder.name, tlFiles)
>  Endif
>Endfor
>
>Function GetFiles
>Lparameters toFolder, tnId
>For each oFile in toFolder.Files
>  Insert into crsFiles ;
>    (FolderId, Filename, FileSize, Modified, Accessed , Created ) ;
>    values ;
>    (tnId, oFile.Name, oFile.Size, ;
>    oFile.DateCreated, oFile.DateLastModified, oFile.DateLastAccessed)
>Endfor
>
>Cetin
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform