Clarion complex COPYFILE command to specify Security Username and Password

Is there any way to copy file to shared folder on network, but folder is not shared for everyone. Copy has to be done with specific username and password , without system dialog screen ?

So do you mean that you want me be able to copy a file there, even though I don’t have it shared to me, by providing a user and password?

I think I’d say no, at least using all the usual copy commands.

You could probably acheive this using something like ftp or similar.

I just asked ChatGPT the question and it suggested you might be able to issue a NET USE to do this.

You would put the following inside RUN()

Something like

NET USE Z: \\Server\Share /USER:DomainName\UserName Password

Not I have never tried this approach. Issue this after the copy.

NET USE Z: /DELETE

I’d be curious to learn if it works.

Mark

When I need to do this, I wrote a little .net utility that uses ProcessStartInfo to start a child process using specified credentials stored in an encrypted file. Then in the child process I do the actual copy file operation.

1 Like

I’ll work around your suggestion. It could works.

I Would have also used the Windows API ProceessStartInfo from within the Clarion App