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...
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.
targetFile: abc.json // Optional. The default is the sourceFile name. You can rename files during the transfer
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.
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)
(explaining the implementation with .NET SDK)
(describing an example with the edge microserver)