Jump to content

Problem with SCMove


This topic is 4469 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello,

I am trying to use the SCMove function to move a file from one directory to another inside my SuperContainer location. Currently my function call looks something like this:


SCMove("WorkingDirectory/UniqueResourceDirectory/","TargetDirectory/"&TABLE::ID)





When I run my script, I get an error, and the supercontainer server says:



Move operation failed: java.io.FileNotFoundException: No SuperContainer file for /WorkingDirectory/UniqueResourceDirectory

No SuperContainer file for /WorkingDirectory/UniqueResourceDirectory



I have also tried my function call like this:





SCMove("WorkingDirectory/UniqueResourceDirectory/file.pdf","TargetDirectory/"&TABLE::ID)

In which case I get the same error but like this:

Move operation failed: java.io.FileNotFoundException: No SuperContainer file for /WorkingDirectory/UniqueResourceDirectory/file.pdf

No SuperContainer file for /WorkingDirectory/UniqueResourceDirectory/file.pdf

I am stumped, as I have tried many variations on the above themes, putting slashes in different places, with and without the file name, etc.

Can someone help? Or possibly provide a working example of how to call SCMove, since the companion plugin documentation does not have one.

Thanks,

Mark

Link to comment
Share on other sites

  • Newbies

Did you call SCSetBaseURL ( ) first?

Yes. I call it in my onOpen() script for the file.

Also you are defining the path to a folder, not a file, in the 'from' path

Hi. I'm not sure if you are telling me this information or asking me for it, but either way, I have tried both. That is, I have tried pointing to a file (first try) and then just pointing to a folder (second try). Both times, same error message, but with different paths, of course.

Thanks.

Link to comment
Share on other sites

Like BCooney suggested, make sure that the baseURL you are setting is the correct one.

Next, make sure a file actually exists in the folder you are passing in: "WorkingDirectory/UniqueResourceDirectory/". If so, that's good. Another small nuance, is whether the former directory requires a "/" prior to. So, have you tried something like:

SCMove( "/WorkingDirectory/UniqueResourceDirectory/" ; "/TargetDirectory/" & TABLE::ID )

I hope this helps. If you have any additional questions or are unable to get this to work with some more trial and error, please do not hesitate to contact me directly at the e-mail address or phone number listed below.

Regards,

Link to comment
Share on other sites

This topic is 4469 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.