Skip to content

Copies and groups files to a target directory for backup

Notifications You must be signed in to change notification settings

JG2401/DownloadsFileSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

DownloadsFileSync

Copies and groups files to a target directory for backup

Setup

Download the powershell file and modify the following variables

required

  • $sourcePath
  • $destinationPath

optional

  • $fileExtensions
  • $pattern (regular expression)
  • $timeSpan

After that, copy the following command to an administrator powershell terminal, run it and fill the requested entries.

Register-ScheduledTask -TaskName DownloadsFileSync -User (Read-Host 'User') -Password ([Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR((Read-Host 'Password' -AsSecureString)))) -RunLevel Highest -Action (New-ScheduledTaskAction  -Execute powershell -Argument "-File $((Read-Host 'Path'))") -Trigger (New-ScheduledTaskTrigger -AtStartup); Start-ScheduledTask -TaskName "DownloadsFileSync"

This should be your result:

Register-ScheduledTask Success Example

About

Copies and groups files to a target directory for backup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published