Jump to content
Sign in to follow this  
tankd0g

Filecopy if changed

Recommended Posts

tankd0g

Hello, I was wondering if anyone could help me with this one.  I am trying to write something that will watch two directories, one is a shared dropbox folder with files I want kept static but are sometimes actidentally changed or deleted by colaborative users.  The other director is my master backup of those files.  Is there a way to keep a script resident so that if any file changes, it will trigger a file copy/overwrite from the backup or do I have to use windows sceduler to run a scrip every 5 minutes or something like that?

Share this post


Link to post
Share on other sites
careca

That is possible, i think you can do it by comparing either modified date or size,

not sure how to retrieve them tho, that will require some work, have you ever done any kind of script?


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
tankd0g

That is possible, i think you can do it by comparing either modified date or size,

not sure how to retrieve them tho, that will require some work, have you ever done any kind of script?

 

Yes, I have a script now that does it when I manually run it but I have no idea how to make it wait and watch the files. 

Share this post


Link to post
Share on other sites
JCEF

The easiest way I know is using "Robocopy.exe;" If my memory does not betray me, is native to the Windows OS from Windows Vista, but there is also a version for XP.

ex:

While 1
    ShellExecuteWait(@SystemDir & "\Robocopy.exe", ' "' & 'DirSource" "DirDestin" /MIR /R:3 /W:3')
    ;ShellExecuteWait(@SystemDir & "\Robocopy.exe", ' "' & 'DirSource" "DirDestin" /MIR /R:3 /W:3', "", "", @SW_HIDE)
    Sleep(5000)
    WEnd

Hope this helps!

Share this post


Link to post
Share on other sites
careca

Does the script copy only the modified / most recent files, or does it copy all regardless of size, please post the script, so we can see if it can be tweaked for your needs.


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
kylomas

tankdog,

>This UDF might interest you...

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×