Jump to content

Filecopy if changed


tankd0g
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

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.

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

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

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.

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...