4 Replies Latest reply: Jan 2, 2013 11:27 AM by CraigB RSS

    Copy File From Oracle Forms 6i (In Window Xp)

    G.Y
      Dear Sir,

      I want to copy file from one drive to another drive, I done it successfully, but I am facing problem there, which file name is greater than 11 character.
      I am using the following command/CODE.

      HOST ('copy '|| :file_name ||' E:\',no_screen);

      please tell me how to cover that problem.
      Thanks
      Yassen.
        • 1. Re: Copy File From Oracle Forms 6i (In Window Xp)
          Prabodh
          Hi,
          I want to copy file from one drive to another drive, I done it successfully, but I am facing problem there, which file name is greater than 11 character.
          I am using the following command/CODE.
          HOST ('copy '|| :file_name ||' E:\',no_screen);
          please tell me how to cover that problem.>

          HOST executes OS commands, in 6i on the client machine. So, depends on which OS you have on the client.

          In Win XP and above there is no limitation of 11 characters. You possibly have space in the file name that is causing the problem. Try
          HOST ('copy "'|| :file_name ||'" E:\',no_screen);
          Note the use of double quotes in the command.

          Cheers,
          • 2. Re: Copy File From Oracle Forms 6i (In Window Xp)
            G.Y
            dear sir
            now i use your code
            HOST ('copy "'|| :file_name ||'" E:\',no_screen);
            it is still not working, i mean its not copying file which file name is greater then 11 character.
            but his code is working fine lest then or equal to 11 characters
            this is my file name and path.
            D:\AZ_Logo\AZLogoAZLog.jpg

            I am using window xp sp-3.
            • 3. Re: Copy File From Oracle Forms 6i (In Window Xp)
              Prabodh
              >
              now i use your code
              HOST ('copy "'|| :file_name ||'" E:\',no_screen);
              it is still not working, i mean its not copying file which file name is greater then 11 character.
              but his code is working fine lest then or equal to 11 characters
              this is my file name and path.
              D:\AZ_Logo\AZLogoAZLog.jpg>
              The double quote will help if and only if the :FILE_NAME has space(s) in it.

              Are you able to perform this operation from Start -> Run -> CMD prompt?
              COPY D:\AZ_Logo\AZLogoAZLog.jpg E:\
              If you get an error then you will need to resolve that error.

              Cheers,
              • 4. Re: Copy File From Oracle Forms 6i (In Window Xp)
                CraigB
                Yassen,
                but his code is working fine lest then or equal to 11 characters
                Does your file get copied, but the file name is truncated to 11 characters or are you getting an error when the file name exceeds 11 characters?

                If the file name is truncated to 11 characters, then I suspect your form field (file_name) is limited to 11 characters.

                If you are getting an error or no error at all, then I agree with Prododh - try your file copy from a command prompt and see if you are getting an error and resolve any error you are getting and then it should work from your Form.

                It is also possible that your "E-Drive", if it is a network drive, that it is restricted to traditional file naming method (eg; 8 characters and 3 character extenstion (total of 11 characters)) and doesn't support large file names.

                Hope this helps.
                Craig...