bb.donnay-software.com

Donnay Software Web Forums
It is currently Tue Jul 14, 2020 9:25 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Wed Dec 14, 2016 9:44 am 
Offline

Joined: Mon Feb 15, 2010 4:01 am
Posts: 38
Hi,
here is a small utility program to make it easier to compare two directories.
The directories to be compared can be selected as well as a filter for type of
files. the 2 directories are displayed green marked are newer files, yellow
marked files are not present in the other directory. File can be copied and deleted.
Dieter

Attachment:
Compare.zip [382.63 KiB]
Downloaded 422 times


Attachments:
Compare.JPG
Compare.JPG [ 153.63 KiB | Viewed 23188 times ]
Top
 Profile  
 
PostPosted: Fri Dec 16, 2016 9:05 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4140
Location: Boise, Idaho USA
I like your utility and I took the liberty to make a few improvements.

I eliminated the first screen and made it a little bit more robust and dynamic.

Now, the user can change directories and file type on the fly with an instant refresh.

I attached the updated source code.

Here is the utility in a self-extracting .zip. It uses Xbase++ 2.0 and eXpress++ build 264.

http://bb.donnay-software.com/util/dcsynchro.exe
Attachment:
snychro.jpg
snychro.jpg [ 169.1 KiB | Viewed 23136 times ]


Attachments:
synchro.zip [3.86 KiB]
Downloaded 460 times

_________________
The eXpress train is coming - and it has more cars.
Top
 Profile  
 
PostPosted: Mon Dec 19, 2016 4:28 am 
Offline

Joined: Mon Feb 15, 2010 4:01 am
Posts: 38
Thank's Roger,
the program looks now much better. The disadvantage is
that the browse arrays are not refreshed after calling their function.

Dieter

---------------------------------------
@ 21.5,82 DCPUSHBUTTONXP ;
CAPTION 'Copy files from ; Dir B to Dir A' ;
SIZE 25, 3 ;
ACTION {||Kopiere("BtoA",@aDir1,@aDir2,cDir1,cDir2),;
DC_GetRefresh(GetList)} ;
COLOR COLOR_DARKGREEN, COLOR_LTBLUE ;
MOUSECOLOR nil, COLOR_CYAN ;
CLICKCOLOR nil, COLOR_PINK ;
BITMAP BITMAP_PREVIOUS_M OFFSET 15 ;
FONT '12.Arial Bold' ;
RADIUS 20 ;
OBJECT oButton2 ;
SHADOW 6


Top
 Profile  
 
PostPosted: Mon Dec 19, 2016 8:37 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4140
Location: Boise, Idaho USA
I didn't finish my testing. My bad.

Here is an update.
I tested it this time.

Also, here is self-extracting version:

http://bb.donnay-software.com/util/dcsynchro.exe


Attachments:
dcsynchro.zip [3.92 KiB]
Downloaded 440 times

_________________
The eXpress train is coming - and it has more cars.
Top
 Profile  
 
PostPosted: Tue Dec 20, 2016 7:10 am 
Offline

Joined: Wed Jan 27, 2010 10:25 pm
Posts: 354
Location: Berlin Germany
I see no chance to choose an other drive than C: ?!?!

_________________
_______________________
Best Regards
Wolfgang


Top
 Profile  
 
PostPosted: Tue Dec 20, 2016 7:51 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4140
Location: Boise, Idaho USA
I added the below code to the source. This will replace the DC_PopDir() function in DCLIPX.DLL.
New source is attached.

Here is updated self-extracting version. http://bb.donnay-software.com/util/dcsynchro.exe

Code:
FUNCTION DC_PopDir()

LOCAL GetList[0], oDirs, oFiles, cDirectory, lStatus, cFileName2, cDir

cDirectory := ''

 @ 0,0 DCDIRTREE ;
       DIRS oDirs VAR cDirectory DATALINK {|c|cDir := c} ;
       FILES oFiles VAR cFileName2 ;
       SIZE 60,20 ;
       EXT '*.*' ;
       FONT '10.Lucida Console'

DCREAD GUI FIT MODAL ADDBUTTONS TO lStatus TITLE 'Choose Directory'

RETURN cDir



Attachments:
dcsynchro.zip [4.09 KiB]
Downloaded 430 times

_________________
The eXpress train is coming - and it has more cars.
Top
 Profile  
 
PostPosted: Tue Dec 20, 2016 10:03 am 
Offline

Joined: Mon Feb 15, 2010 4:01 am
Posts: 38
Hello,
this is the newest version of 'compare directories' (incl. DC_Popdir)
Functions:
-compare any directories
-set a filter on type of file (via DCCombobox)
-newer files are marked
-files not present in other directory are marked, just as number of files
-sort of directories on name or date
-copy or delete files

That's it (for the moment)
Dieter
Attachment:
Compare.JPG
Compare.JPG [ 167.45 KiB | Viewed 23060 times ]


Attachments:
COMPARE.zip [383.84 KiB]
Downloaded 460 times
Top
 Profile  
 
PostPosted: Fri Dec 23, 2016 11:14 am 
Offline
User avatar

Joined: Thu Jan 28, 2010 10:27 am
Posts: 130
Location: NYC
Dieter,

Nice job!


Bobby


Top
 Profile  
 
PostPosted: Mon Dec 26, 2016 8:27 pm 
Offline
User avatar

Joined: Sun Jan 31, 2010 8:32 am
Posts: 158
Location: Albuquerque, New Mexico, USA
Excellent utility.
What about adding the ability for the user to enter any filename extension filter so that it can be used to clean up other file types
such as mp3, mp4, jpg, etc.
This has great potential for cleaning up music, photo, video, etc. folders, not just for programmers.

Good work.


Top
 Profile  
 
PostPosted: Tue Dec 27, 2016 9:31 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4140
Location: Boise, Idaho USA
Quote:
What about adding the ability for the user to enter any filename extension filter so that it can be used to clean up other file types such as mp3, mp4, jpg, etc.

These code changes will give you that capability. Just type in the file spec.
Code:
#include "Appevent.Ch"
....

LOCAL bLoad := {|| LoadDirArrays(cDir1,aDir1,cDir2,aDir2,cType),DC_GetRefresh(GetList)}

....

 @ 0.0, 64 DCCOMBOBOX cType LIST aTypeF SIZE 12,15 FONT '12.Lucida Console' ;
           ITEMSELECTED bLoad ;
           EVAL {|o|o:keyboard := {|n,b,o|IIF(n==xbeK_ENTER,(o:getData(),Eval(bLoad)),nil)}}

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group