Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
antonio-domenic
Level III

JMP 15 vs JMP 13 Copy directory using recursive option

I noticed that the new version of JMP (15) does not work like JMP13 when I try to copy an entire directory with all its content. The recursive option works only if the source directory is local, while if it is in the remote server on the network the subdirectories are not copied. In JMP 13 this works as expected.

Is this an undesired behavior, or in JMP15 there are additional checks that prevent the network resources to be copied (any setup needed)?  

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
antonio-domenic
Level III

Re: JMP 15 vs JMP 13 Copy directory using recursive option

No way to use Copy Directory from remote server even if you have the permissions to read from. To workaround I wrote a function that recursively browse the starting directory, create all directories, if any, and copy each file.

View solution in original post

7 REPLIES 7
Highlighted
vince_faller
Super User

Re: JMP 15 vs JMP 13 Copy directory using recursive option

I've had problems with copy directory in the past, though mine wasn't due to a remote server. This worked for me just fine when I tried on JMP 15. 

 

Names default to here(1);

from_path = convert file path("\\FALLER\Users\falle\Desktop\test\");
Create Directory(from_path);
Save Text file(convert file path("outerfile.txt", base(from_path)), "Test outer");
create Directory(convert file path("inner\", base(from_path)));
Save Text file(convert file path("inner\innerfile.txt", base(from_path)), "Test outer");

to_path = convert file path("$DESKTOP");

rc = Copy Directory(from_path, to_path, recursive(1));

Does it just return a zero when you try to copy the directory? 

Vince Faller - Predictum
Highlighted
antonio-domenic
Level III

Re: JMP 15 vs JMP 13 Copy directory using recursive option

Yet, it just return 0. This is the log:

rc = Copy Directory(from_path, to_path, recursive(1));

 

0

Directory has been created into to_path and its is empty, no inner directory, no outerfile.txt.

I tried also as from_path:

"C:\TEMP\test2\"

This worked, test2 has been created into desktop with all contents.

Highlighted
vince_faller
Super User

Re: JMP 15 vs JMP 13 Copy directory using recursive option

I wonder if it could possibly have something to do with your windows security settings. 

 

https://community.jmp.com/t5/Discussions/How-to-disable-JMP-security-warning/m-p/56334#M31632

 

 

Vince Faller - Predictum
Highlighted
antonio-domenic
Level III

Re: JMP 15 vs JMP 13 Copy directory using recursive option

I cannot change the windows security settings. But I'm sure that something changed in JMP. My version 13 works on same system same servers.

Highlighted
vince_faller
Super User

Re: JMP 15 vs JMP 13 Copy directory using recursive option

Right, JMP 14 started using these settings.  Save a jmp table to the directory and then try to open it.  If you see a security warning, that might be your issue.  

Vince Faller - Predictum
Highlighted
antonio-domenic
Level III

Re: JMP 15 vs JMP 13 Copy directory using recursive option

OK, now security setting have an impact. I tried your suggestion, save a file into remote directory and then open it again. I didn't received any security warning, nor during saving neither during opening. to give more detail, I have read and write permission on the remote server directory. About internet security level, our systems are set as medium-low zone in the local internet security properties and medium in trusted sites properties. What is needed to use the function in object?

Highlighted
antonio-domenic
Level III

Re: JMP 15 vs JMP 13 Copy directory using recursive option

No way to use Copy Directory from remote server even if you have the permissions to read from. To workaround I wrote a function that recursively browse the starting directory, create all directories, if any, and copy each file.

View solution in original post

Article Labels

    There are no labels assigned to this post.