Kbase P132688: 4GL/ABL: Does the OS-COPY statement work with shared network drives?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  25/06/2008 |
|
Status: Unverified
GOAL:
4GL/ABL: Does the OS-COPY statement work with shared network drives?
GOAL:
Can we use the 4GL/ABL OS-COPY statement to copy a file to shared network drive using the UNC name convention?
GOAL:
Can the 4GL/ABL OS-COPY statement copy a file to shared network drive that is not mapped to the local Windows client?
FIX:
Yes, the 4GL/ABL OS-COPY statement works fine with shared network drives specified using the UNC name convention provided the permissions policy on these drives grant copy privileges to the 4GL/ABL client running the code.
For example, the following code uses the OS-COPY statement to copy a file to a shared network drive using its UNC name. The code works regardless of whether the shared network drive is mapped to the local Windows client or not:
DEFINE VARIABLE cSharedNetworDriveUNCName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cSourceFileName AS CHARACTER NO-UNDO.
ASSIGN
cSharedNetworDriveUNCName = '\\hostname\deptname\users\username\directoryname'
cSourceFileName = "C:\OpenEdge\WRK101B\FileToBeCoiped.ext".
OS-COPY VALUE(cSourceFileName) VALUE(cSharedNetworDriveUNCName).