Sign in to follow this  
Followers 0
coolcat

Moving A file to a different directory

5 posts in this topic

Hi All,

I would like to move a file to a different directory...

I read this but didn't see how....

http://www.360works.com/plugins/FTPPLUGIN/documentation.html

directory:

file1

file2

FOLDER1

GOAL: I would like to move file1 to FOLDER1

what function(s) do I use?

(I hope I don't have to download then upload the delete original - do I?

Share this post


Link to post
Share on other sites

afaik, there is no move. So, yes, download, upload and go back and delete.

Share this post


Link to post
Share on other sites

If you're moving the file to an existing directory then you can move it by calling:

FTPeek_Rename( "file1" ; "FOLDER1/file1" )




If the folder does not exist then create the folder first by calling:


FTPeek_MakeDir( "FOLDER1" )

I will adjust the documentation file for next release to make this more apparent.

Share this post


Link to post
Share on other sites

Hi, 

 

This is amazing, but I can I use the FTPeek_Rename command also to move a folder? I am now downloading a file, and re-uploading it to a different folder, then delete the FTP origin directory. This is a burden on bandwidth - I am usually just a lot faster to simply move the directory remotely using a FTP client. 

 

Can we use FTPeek_Rename to move a folder around?

 

I have also - unsuccessfully - attempted to use FTPeek_ExecuteCommand and RNFR - RNTO sequence; but that just threw errors....

 

Thank you!

Share this post


Link to post
Share on other sites

FTPeek does not currently support using FTPeek_Rename to move a folder around. I would expect a good workaround to be the FTPeek_ExecuteCommand function.

 

If that threw errors, the plugin should have caught said errors and logged them with a readable message. Can you reproduce the problem and follow the steps listed here to send in your log file:

 

http://docs.360works.com/index.php/Send_us_a_bug_report

 

360Works can also customize the plugin for you. Please send an email to infobox@360works.com if you would like an estimate on customizing the FTPeek plugin.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0