How to copy an item in the folder in user code?

Best practices, code snippets for common functionality, examples, and guidelines.
atruon
Posts: 12
Joined: Wed May 24, 2017 11:14 pm

How to copy an item in the folder in user code?

Post by atruon » Wed May 24, 2017 11:18 pm

I tried to copy a project using file class in C#. However, I realized that its copy is .txt file, not the actual project. Is there any way to write a code to copy exactly a project?

User avatar
Vega
Posts: 109
Joined: Mon Jul 11, 2016 2:15 pm

Re: How to copy an item in the folder in user code?

Post by Vega » Thu May 25, 2017 9:05 pm

Since Ranorex sits on the .NET framework, you have a lot of power and flexibility at your disposal. However this may be more easily solved using some built in windows command line tools like xcopy (Copies files and directories, including subdirectories) from within Ranorex :

https://www.microsoft.com/resources/doc ... x?mfr=true

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: How to copy an item in the folder in user code?

Post by tvu » Thu May 25, 2017 10:37 pm

You can write a batch file that copies the desired files and then call it from a recording.

atruon
Posts: 12
Joined: Wed May 24, 2017 11:14 pm

Re: How to copy an item in the folder in user code?

Post by atruon » Tue Aug 08, 2017 10:17 pm

Thanks guy!