Trying to copy file upon change in directory

Get help for specific problems
Posts: 1
Joined: 23 Mar 2020

Ocht

I need to copy a single file from one folder (Source) to another (Destination) the moment that a change is made. I tried using RealTimeSync to do this, but I am getting an error (I'm sure I'm doing something obviously wrong so I'll post it here"

I setup the source and destination and attempt to have the sync idle for one second before trying again, but get the following errors
```
Incorrect command line: Copy-Item "C:\Battlestate Games\EFT (live)\EscapeFromTarkov_Data\Managed\Assembly-CSharp.dll" -Destination "C:\Users\Admin\Desktop\backup"

ERROR_FILE_NOT_FOUND: The system cannot find the file specified. [ShellExecuteEx]
```
This is my setup
First Folder
C:\Battlestate Games\EFT (live)\EscapeFromTarkov_Data\Managed
Second Folder
C:\Users\Admin\Desktop\backup
Idle Time: 1
Command line
Copy-Item "C:\Battlestate Games\EFT (live)\EscapeFromTarkov_Data\Managed\Assembly-CSharp.dll" -Destination "C:\Users\Admin\Desktop\backup"
I expected this to copy Assembly-CSharp.dll to Backup when Assembly-CSharp.dll is changed by time and size, but perhaps I am confused? Thanks for any help.

PS. Apparently I'm not allowed to post links/images yet, so ask me if I need to provide anything else
Posts: 292
Joined: 13 Apr 2017

Gianni1962

Try this command:

xcopy "C:\Battlestate Games\EFT (live)\EscapeFromTarkov_Data\Managed\Assembly-CSharp.dll" "C:\Users\Admin\Desktop\backup\"