File synchronization

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
AZJIO
Addict
Addict
Posts: 1312
Joined: Sun May 14, 2017 1:48 am

File synchronization

Post by AZJIO »

Download: yandex upload.ee

screenshot (Linux)
Image

The program compares two directory to the identity of the files and the difference can be noted flag and copy the missing files.

The work is not completed and tested superficially.
Last edited by AZJIO on Thu Oct 27, 2022 9:57 am, edited 9 times in total.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: File synchronization

Post by Kwai chang caine »

Looks great, but like usually difficult to test witout read all texts :wink:
So thanks for sharing 8)

About this, i have a question, do you know why PB IDE can't read Russian characters, then notepad and Firefox yes ? :shock:

NotePad and Firefox
ComboBoxGadget(#Cmb, 10, 462, 80, 28)
AddGadgetItem(#Cmb, -1, "разные пути")
AddGadgetItem(#Cmb, -1, "разные путь размер")
AddGadgetItem(#Cmb, -1, "разные путь дата")
AddGadgetItem(#Cmb, -1, "разные путь размер дата")
AddGadgetItem(#Cmb, -1, "одинаковые пути")
AddGadgetItem(#Cmb, -1, "одинаковые путь размер")
AddGadgetItem(#Cmb, -1, "одинаковые путь дата")
AddGadgetItem(#Cmb, -1, "одинаковые путь размер дата")
SetGadgetState(#Cmb, 0)
Pb IDE
Image
ImageThe happiness is a road...
Not a destination
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: File synchronization

Post by Marc56us »

About this, i have a question, do you know why PB IDE can't read Russian characters, then notepad and Firefox yes ?
PB IDE default font (Courier) is very old and not not display all characters.
Use Courier New or Consolas (the best for coding IMHO) or any other.
Also set editor to Utf-8
:wink:
AZJIO
Addict
Addict
Posts: 1312
Joined: Sun May 14, 2017 1:48 am

Re: File synchronization

Post by AZJIO »

Kwai chang caine wrote: Thu Jul 08, 2021 3:22 pm SetGadgetState(#Cmb, 0)
1. You have downloaded the old version. It is not convenient for me to update the link upload.ee. Many people ask for an alternative download link, as there are problems with yandex. But the link to yandex contains the most recent updates. By the link "upload.ee" I have to edit the link on all forums, but I don't need to change anything on yandex.
2. I'm in a hurry to post, so I'm putting off language support for later. Instead, I improve the appearance and interactivity.

Updates via the link to yandex.
Temporarily for Linux, I made the use of the "find" utility as a list of files.
Added "drag and drop".
Relevant choice comparisons are set by default (in the drop-down list).
Added a menu for opening a file in the explorer and in the associated program
Added auto-alignment of columns of the file table by the width of the content (Windows only)
AZJIO
Addict
Addict
Posts: 1312
Joined: Sun May 14, 2017 1:48 am

Re: File synchronization

Post by AZJIO »

Added source code with language support.
Added several improvements for Linux.
Both links contain new files.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: File synchronization

Post by Kwai chang caine »

I have downloaded the yandek link and the "Synchronization.ico" is missing :wink:
Added source code with language support.
I have not see the difference between the old version :oops:

@Marc56
I have never change the font since the begining :shock: :lol:
And never i imagine it's that the problem :oops:
Thanks a lot for your new precious help 8)
ImageThe happiness is a road...
Not a destination
AZJIO
Addict
Addict
Posts: 1312
Joined: Sun May 14, 2017 1:48 am

Re: File synchronization

Post by AZJIO »

Kwai chang caine wrote: Sat Jul 10, 2021 3:22 pm "Synchronization.ico"
Added
Kwai chang caine wrote: Sat Jul 10, 2021 3:22 pm I have not see
Synchronization_Uni.pb
User avatar
[blendman]
Enthusiast
Enthusiast
Posts: 297
Joined: Thu Apr 07, 2011 1:14 pm
Location: 3 arks
Contact:

Re: File synchronization

Post by [blendman] »

Hi

Your first screenshot is from linux ?
The interface is beautiful :).
On windows, we don't have this kind of beautiful GUI (dark mode) :(
We have always the old ugly gui...


So, you programme is great ! I have tried it, it was what I was looking for (to save only my files that have changed), so thank you a lot.

I have made a little change in the code, to see the changes by date ;) :
line 735 (Synchronization_Uni.pb)

Code: Select all

Case 2 ; путь дата
	Files() = tmp$ + Chr(10) + FormatDate("%dd/%mm/%yyyy%hh:%ii:%ss", GetFileDate(tmp$, #PB_Date_Modified))
Case 3 ; путь размер дата
	Files() = tmp$ + Chr(10) + Str(FileSize(tmp$)) + Chr(10) +FormatDate("%dd/%mm/%yyyy%hh:%ii:%ss", GetFileDate(tmp$, #PB_Date_Modified))
 
best regards

Marc56us wrote: Thu Jul 08, 2021 4:56 pm
About this, i have a question, do you know why PB IDE can't read Russian characters, then notepad and Firefox yes ?
PB IDE default font (Courier) is very old and not not display all characters.
Use Courier New or Consolas (the best for coding IMHO) or any other.
Also set editor to Utf-8
:wink:
Thank you a lot, Marc56us !
Punaise, j'avais jamais pensé à changer la font de l'éditeur, non plus ^^
C'est vraiment mieux avec une autre font.
Consolas font is very cool to code ;)
Pinaise !
A+
AZJIO
Addict
Addict
Posts: 1312
Joined: Sun May 14, 2017 1:48 am

Re: File synchronization

Post by AZJIO »

[blendman] wrote: Sun Jul 11, 2021 6:32 pm FormatDate
I wondered if I need to convert all the files, slowing the speed of the function.
For example, from thousands of files I have updated 3 files, then it is advantageous to add the number processing only for the files added.
Row splitting on 2-3 parts to replace the number, it also requires a more complex algorithm and increase processing time.
So I do not hurry to make a choice.
I wrote this program earlier on AutoIt3, with additional settings. And actively used it for almost 10 years.

At the moment, this is your way better than a useless number. I added like this:
%yyyy.%mm.%dd %hh:%ii:%ss

Added unchecking on successful copying or deleting.
AZJIO
Addict
Addict
Posts: 1312
Joined: Sun May 14, 2017 1:48 am

Re: File synchronization

Post by AZJIO »

Update
Case insensitive in file extensions
Improved find behavior on Linux
Added item "List to clipboard"
Added help file CHM (UTF-8, Ru)
Post Reply