Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ListDirectoryDetails
Message
From
19/04/2010 01:55:21
 
 
To
19/04/2010 01:47:52
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01460672
Message ID:
01460857
Views:
26
>Been digging in old foxpro code ( remember your article about ftp ?)
>
>A client of mine has a website. All the invoices have a code. With that code the customer can look at the details of the invoice. The detail of the invoice is kept for about a year.
>
>To do that I have a local mirror (which can be any level deep). Each morning I will add the new invoices to the mirror and delete the ones that are more than a year old
>
>I then sync a remote folder with the local folder
>
>Sync is done in a couple of steps
>(1) create blank cursor
>FileName M ( = relative file path to the local mirror / remote mirror)
>
>Local L, true if it exists locally
>IsFolder_Local
>Size_local I
>Time_local T
>
>Remote L (true if it exists remotely)
>IsFolder_Remote
>Size_remote
>Time_remote
>
>(2) Fill the cursor with the local files (to any depth)
>- FileName
>- Local true
>- size_local
>- time_local
>
>(3) Fill the cursor with the remote files
>Remote L (true)
>Size_remote
>Time_remote
>
>If the file alreay exists in the cursor, I fill out the fields
>otherwise, I append a record and fill out FileName + fields
>
>
>(4) Remove obsolete remote files
>- cursor is sorted in length of the filename DESCENDING ( so I process files before the conatining folder)
>
>for each record where ( !Local and Remote) or (IsFolder_Loal < > isFolder_Remote)
> delete remove file (or folder)
>
>(5) Sync local >> remote
>- cursor is sorted in length of the filename ASCENDING ( so i process folders before the files in them)
>
>for each record where ( local and (!remote or Time_local > Time_remote )
> make folder or tyransfer file

Thanks for elaboring the schema on this. It gives some great ideas.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform