cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Move files from one directory to another directory

vi1
15-Moonstone
15-Moonstone

Move files from one directory to another directory

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

3 REPLIES 3
posipova
20-Turquoise
(To:vi1)

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


vi1
15-Moonstone
15-Moonstone
(To:posipova)

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

serler
7-Bedrock
(To:vi1)

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)

Top Tags