topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 12:00 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Some programm which is able to recognize newer versions when copying  (Read 9796 times)

Webijou

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 7
    • View Profile
    • Donate to Member
Hello everybody,

I have a rather hard time to save my documents on the other hard drive, an external disc. I have to manually find the folders which hold my new works (from original drive, let's say "C")  in Explorer and then copy them, because otherwise the system would just copy from the scratch. It would copy everything, if I would just highlight for copying the main folder and that would last hours, because they are big ones. Good would be to tell the system: copy "C:/" to e.g. "D:/" and then the sys would quickly find out what has changed and only copy the new files.

I have an FTP programm for instance, which absolutely notices the date/time of the file-version and asks me, whether I want to copy the already uploaded files. ("Newer version exists in the destination folder - do you want to copy it?") When I click "no to all" the programm just updates the files which have been changed since the last copy-process. Is that not wonderful?

Regrettably my system does not do this. Maybe someone knows whether there is a device already available for free? I have Windows XP installed on the C and plain folders on the D (no XP there).

Thank you for warming up your grey cells for me.

Just challenge me and I will quote you in my sig-line! ;-)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Aren't you looking for an incremental backup program?
There's a DC's Pro-User Backup Guide which might probably have the answer for the questions you're asking.
Isn't that what you want?

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Hello,

More than a long discuss, here's a script code that does the exact trick you want :)
Enjoy!

#Option Explicit
$AppType Console
' **********************************************************************
' // Source dir to Dest dir with CRC script
' // CRC changed? If Yes, then modified file will be replaced onto Dest
' // Author   : Gerome GUILLEMIN
' // Date     : 06th Of April 2006
' // Language : FBSL
' **********************************************************************
Dim $Src = "C:\Source\"
Dim $Dst = "D:\Backup\"
Dim $Joker = "*.*"

If FindFirst( Src & Joker ) <> "" Then
  CheckAndCopy ( Findfirst )
  While FindNext() <> ""
    CheckAndCopy( Findnext )
  Wend
End If
Pause

Sub CheckAndCopy(Byref $szFound)
  If szFound = "." OrElse szFound = ".." Then Exit Sub
  Dim %srcCRC = 0, %dstCRC = 0

  srcCRC = CheckSum(FileLoad(Src & szFound))
  If FileExist( Dst & szFound ) Then
    dstCRC = CheckSum(FileLoad(Dst & szFound))
  End If
  If (srcCRC = dstCRC) AndAlso dstCRC <> 0 Then Exit Sub
  ? "[CRC diff] Copying ", Src & szFound, " -> ", Dst & szFound

  CopyF( Src & szFound, Dst & szFound )
End Sub
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)

Webijou

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 7
    • View Profile
    • Donate to Member
Thank you jgpaiva, I have checked the site. It seems, that it is in fact a backup tool which I am looking for.

Gerome! You really made my day :-) Thank you very much for the code. The only problem is, that I do not know, what to do with it, since a little html and css and such are my only code-skills. Could you tell me, where I can put the code into? Only if it is not too time-consuming for you. 
Just challenge me and I will quote you in my sig-line! ;-)

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Hi,

Thank you jgpaiva, I have checked the site. It seems, that it is in fact a backup tool which I am looking for.

Gerome! You really made my day :-) Thank you very much for the code. The only problem is, that I do not know, what to do with it, since a little html and css and such are my only code-skills. Could you tell me, where I can put the code into? Only if it is not too time-consuming for you. 

Either you can download FBSL there : http://gedd123.free.fr/FBSLv3.exe
Or either you can try the code i gave you by pasting there : http://gedd123.free.fr/studio

The 1st solution will install the full interpreter + compiler + editor + 525 pahe Help manual with tutorials
The 2nd solution will allow you to quick and blindly compile the script i gave you into a stand alone EXEcutable.

Both solutions are able to produce standalone EXEcutable and the memory footprint is around 2 Mb of RAM, that is to say not greedy at all onto our decent machines ;)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) How about using XCOPY?

The following copies all changed files from C:\ to D:\, resetting the attribute, overwriting existing files and ignoring any errors. If you pipe it to a file you can use FIND to log the errors.

XCOPY /M /E /C /F /G /H /I /R /Y C:\ D:\

Skrommel

Webijou

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 7
    • View Profile
    • Donate to Member
Thank you, Gerome, yet this is still too fancy code for me. I would need a very easy tool, really for non-programmers. Something quite ready-to-use. But my best wishes (btw) for your FBS- language! 

Hi Skrommel - is there something like a ready made programm which has this code included? I am talking about something like Drag King, e.g. This programm came to my computer, I opened it and it just did what I wanted, I did not have to make an exe for myself or so. Maybe my suggestion is just beyond the size of a "snack", I don't know. 
Just challenge me and I will quote you in my sig-line! ;-)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
:) How about using XCOPY?
;D ;D ;D Always with the perfect simple solution.
Nice one!

Thank you jgpaiva, I have checked the site. It seems, that it is in fact a backup tool which I am looking for.
I noticed that might have been the case. If you feel like searching, there are a few threads in the forum about backup tools, and i think there is even a review coming that will focus on backup tools explicitly (not exactly on a guide, like the link i posted before)

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) Just copy the XCOPY line into Notepad, and save it as "Backup.cmd" (including the quotation marks, or it will end up a text file). Now make a shortcut to it to put on your desktop and change the icon, and you're good to go. And maybe add it to Scheduler to have it run automatically every night.

Skrommel

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Hello,

:) Just copy the XCOPY line into Notepad, and save it as "Backup.cmd" (including the quotation marks, or it will end up a text file). Now make a shortcut to it to put on your desktop and change the icon, and you're good to go. And maybe add it to Scheduler to have it run automatically every night.

Skrommel

Yes, but XPCOPY is not able to see IF the file has been REALLY updated aka NOT only the DATE but ALSO the inner contents!!!

BUT, if you want to use COPY and log it onto a living window, you can use Fbsl to execute and pipe in perfect sync :)

Dim %hEdit = Fbsl_control("edit", Me, "", 1, 0, 0, 160, 250, 0x50310084, 0)
 
  Fbsl_SetText( Me, "Copy..." )
  Resize(Me, 0, 0, 170, 280 ): Center(Me): Show(me)

  Dim $buf = StrPipe("CMD.EXE /C DIR c:\DDE\*.* | copy /Y /V c:\DDE\*.* d:\Temp\" )
  Fbsl_SetText( hEdit, buf )
  MsgBox( Me, "Operation completed!", "CHECK POINT", MB_ICONINFORMATION )

Begin Events
End Events

Enjoy ;)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)
« Last Edit: April 06, 2006, 02:41 AM by Gerome »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
 :) I agree that XCOPY hardly is a (two way) sync tool, but as a quick backup tool it is all I have ever needed. And using /M it checks for and removes the ATTRIB, so it is fast too, only copying the files changed since the last backup.

Skrommel

Webijou

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 7
    • View Profile
    • Donate to Member
Thank you all very much. Meanwhile I have found exactly what I was looking for, a slim program very good for my purposes. Done by Karen http://www.karenware...ols/ptreplicator.asp
I like the program, it is free and easy to use, uncomplicated, does what one expects not less, not more. 

I wonder if it would be seen as presumptuous if I write a little one paragraph end-user "review" for her program? I am new here.

And I wonder as well, whether some programmers could maybe have some reservations against the concept of the site, especially if the coders are very restrictive concerning freeware projects or so?
So I do not know, yet would like to say thanks to Karen that way.

 

Just challenge me and I will quote you in my sig-line! ;-)

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
I wonder if it would be seen as presumptuous if I write a little one paragraph end-user "review" for her program? I am new here.

Not at all go for it!

Oh and welcome ...

Webijou

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 7
    • View Profile
    • Donate to Member

Not at all go for it!

Oh and welcome ...
-Carol Haynes (April 06, 2006, 03:05 PM)

Thank you, Carol!
Just challenge me and I will quote you in my sig-line! ;-)