Anyone manged to get the file_copy function working?

Hello Everyone.

I’m looking into replacing some EXEC function calls with the new(ish) file_copy function.

This works:-
file_copy( ‘\\srvcreappfil01\filestore\data_services\FILE_NAME’, ‘\\srvcreappfil01\filestore\data_services\archive’, 1 );

This doesn’t work, even though the variables are set to the same values as the statement above:-
file_copy( $G_FILE_NAME, $G_ARCHIVE, 1 );

Has anyone else seen this behaviour?


Nemesis :australia: (BOB member since 2004-06-09)

I only ever escape the first “” slash. “\\srvcreappfil01\filestore\data_services\FILE_NAME”

I use my own custom file copy function. I have it take an email address list as a parameter in case the copy fails. My file move also retries several times in case DS forgets to close the file handle like its supposed to.


jlynn73 :us: (BOB member since 2009-10-27)

When I tried the same code again the next morning it all worked.

Looks like this is a ‘turn-it-off-and-on-again’ issue :expressionless:


Nemesis :australia: (BOB member since 2004-06-09)