Hi,
I have created files under C:\ThingworxStorage\repository and need to move files to D:Drive.
How to move the files one directory to another directory using service?
Thank you in advance...
Regards,
Latha
You may look into filerepository services, for example, "copy"
sourceRepo: SystemRepository // Name of the Thing to transfer from
targetRepo: RT1 // Name of the Thing to transfer to
sourcePath: /files // Directory in the SystemRepository
targetPath: /In // The name of a virtual dir. In my example it is pointing to C:\Microserver\in. You can also specify subdirs.
sourceFile: abc.json
targetFile: abc.json // Optional. The default is the sourceFile name. You can rename files during the transfer
Hi,
Thanks for information.
In FileRepository services, MoveFile() service is available.
Using MoveFile() service, I can move the files within systemRepository or FileRepository.
I cann't move the files from C: Drive to D:Drive.
Could you give more details where is service available what you have explained in below.
Thank You
One Option to realize what you need is, to define a "Remote Thing with File Transfer" and having a running SDK or Edge Microserver to enable the D-Drive-Location as repository.
More Information and a working example can be found in the
- Introduction to Thingworx 8 Training - Chapter: File Repositories and File Transfer
(In this exercise a Java_SDK implementation is used)
- https://community.ptc.com/t5/IoT-Tech-Tips/How-to-transfer-file-to-and-from-the-Edge-using-the-NET-SDK/td-p/534709
(explaining the implementation with .NET SDK)
- https://www.ptc.com/en/support/article?n=CS206885
(describing an example with the edge microserver)