Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Addition of a MOVE FILE command
Wed, Oct 1 2014 5:24 AMPermanent Link

Adam Brett

Orixa Systems

We have

COPY FILE

and

DELETE FILE

If I want to MOVE a file, right now I have to write 2 whole lines of code rather than just 1 Smile

However it would be useful to have a MOVE FILE command as, particularly if you are moving to or between REMOTE stores the COPY can fail, in which case you might not want to DELETE.
Sat, Oct 4 2014 12:59 PMPermanent Link

Barry

Can you not write a job to Copy the file to the remote store, that will also query the remote store to see if the file is there before you Delete it?

You can query the Stores and loop through the files using the standard cursors like:

PREPARE StoreStmt FROM 'SELECT Name FROM Configuration."Stores" WHERE Name LIKE ''BackUps%'' ';

This is what I use in a job for local stores, like backups on the server.

Barry
Tue, Oct 7 2014 11:41 AMPermanent Link

Adam Brett

Orixa Systems

Yes I can do that and I have jobs which do it.

My thinking was really that since we already have the MOVE key-word in EDBSQL (ALTER COLUMN xxxx MOVE TO yyy) it might be useful to extend its usage to the file-management capabilities of EDB.
Image