NetTalk Central

Author Topic: Copy file to another server folder  (Read 8529 times)

Manuel

  • Newbie
  • *
  • Posts: 41
    • View Profile
Copy file to another server folder
« on: June 27, 2014, 10:50:03 AM »
Hi

I have to upload a file,  and then copy it from server to another server folder.

Is it possible?

TIA

Regards
Manuel

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Copy file to another server folder
« Reply #1 on: June 29, 2014, 04:49:27 AM »
Yes, when you upload file you can do with it whatever you want. From that point you are in charge with that file exactly same as in desktop application.

Best regards,

Djole

Manuel

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Copy file to another server folder
« Reply #2 on: June 29, 2014, 10:57:18 AM »
Hi Djole,

It is ftp app. I have not found any NT ftp method to do it.  Do you mean Clarion has commands to do it?

Thanks
Manuel

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Copy file to another server folder
« Reply #3 on: June 29, 2014, 11:43:35 AM »
Ok. Maybe I need more information.

Does you produce server side program or client side program?

Best regards,

Djordje Radovanovic

Manuel

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Copy file to another server folder
« Reply #4 on: June 29, 2014, 04:15:02 PM »
It is ftp client.

I have to upload a file to server folder,  and then copy it from server to another server folder.

I asked server administrator to use ftp.temp property but he prefer copy the file to another folder.

Thanks
Manuel

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11176
    • View Profile
Re: Copy file to another server folder
« Reply #5 on: June 29, 2014, 10:14:51 PM »
I'm not really sure what you are asking because you have not defined what mechanism you want to use to copy the file from one server to another.

Is your code running on the client machine, or the server machine?

BTW - yes, clarion has a command COPY for copying files from one folder to another.

cheers
Bruce

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Copy file to another server folder
« Reply #6 on: June 30, 2014, 12:39:07 AM »
It is strange request. If you have access via ftp to that destination folder, why not upload file direct to that folder?

Best regards,

Djordje Radovanovic

Manuel

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Copy file to another server folder
« Reply #7 on: June 30, 2014, 11:03:12 AM »
It is strange request. If you have access via ftp to that destination folder, why not upload file direct to that folder?


I think is used to avoid upload delay error. They use timer process to detect new file. 

Nettalk solve it with  NetFTP:UseTempFile property (uploads to a temporary file first and then renames to the correct file once the uploading is complete), but they want I copy the file to other folder of the same server.

Thanks
Manuel


Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Copy file to another server folder
« Reply #8 on: June 30, 2014, 01:05:21 PM »
http://www.nsftools.com/tips/MSFTP.htm

This is list of ftp client commands.

Find one that suit your need. I did not find appropriate command.  :(

Best regards,

Djordje Radovanovic

Manuel

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Copy file to another server folder
« Reply #9 on: June 30, 2014, 02:30:36 PM »
Tried at prompt with ftp rename command and works.

ftp>  rename /myfolder/upload/myfile.xml  /myfolder/myfile.xml  works

Thank you
Regards
Manuel Allo

Manuel

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Copy file to another server folder
« Reply #10 on: July 01, 2014, 05:42:05 AM »
Tried at prompt with ftp rename command and works.

ftp>  rename /myfolder/upload/myfile.xml  /myfolder/myfile.xml  works


I supposed rename worked only in same folder. I was wrong.
So I can upload the file, move it to  wached folder, and upload file again.

Thank you
Regards
Manuel