Copy_File() limitations?

Product Compare Forums Multi-Edit Support Copy_File() limitations?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2796
    MewUser
    Participant

    This issue was due to an extension greater than 5 characters. I set the PC to show all extensions, and found out that these two files only have a .xxx extension.

    Please ignore/remove this posting.

    I am trying to copy the following:

    str SourceStr = "C:\\Users\\Rivals-01\\Documents\\Rivals_Eng\\PFSync123Project(Four)\\Old_Revs\\PFSync123_V0.77\\PFSync123_Prj.Project";

    str DestStr = "C:\\Users\\Rivals-01\\Documents\\Rivals_Eng\\PFSync123Project(Four)\\Old_Revs\\PFSync123_V0.78\\PFSync123_Prj.Project";

    ReturnVal = copy_file (SourceStr, DestStr,0);

    For this, ReturnVal = 2, and I print out the SourceStr, and all that is shown is this:

    C:\Users\Rivals-01\Documents\Rivals_Eng\PFSync123Project(Four)\Old_Revs\PFSync123_V0.77\PFSync123_Prj.Proje

    A similar file with extension Workspace is only shown as *.Works(ReturnVal is also 2).

    According to WINError.sh, this is
    //
    // MessageId: ERROR_FILE_NOT_FOUND
    //
    // MessageText:
    //
    // The system cannot find the file specified.
    //
    #define ERROR_FILE_NOT_FOUND 2L

    What kind of restriction is Copy_File() running into?

    Thank you for a prompt resolution to this matter.

    #9112
    Clay Martin
    Keymaster

    Hi,
    Try declaring your string with a size. The default is 256. So try this instead:

    str SourceStr[1024] = "C:\\Users\\Rivals-01\\Documents\\Rivals_Eng\\PFSync123Project(Four)\\Old_Revs\\PFSync123_V0.77\\PFSync123_Prj.Project";

    HTH,
    Clay

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.