Move Files to another folder
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Move Files to another folder
I have files on an FTP site which I can read no problem but after I do some processing, I want to move the files to another folder on the FTP site so they don't get processed a second time. I can copy and then delete or just move.
Any suggestions would be greatly appreciated....
Thanks, Dan
Any suggestions would be greatly appreciated....
Thanks, Dan
Re: Move Files to another folder
Hi Dan,
Try this:
Best,
Mark
Try this:
Code: Select all
put "RNFR" && theDir & theFilename into myCommand
put libUrlFtpCommand(myCommand,myDomain,gUserName,gPassword) into rslt
put "RNTO" && theNewDir & theFilename into myCommand
put libUrlFtpCommand(myCommand,myDomain,gUserName,gPassword) into rsl
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Move Files to another folder
I tried this and I'm getting the following errors which I don't really understand...
550 file unavailable, user profile has no access
553 could not rename file
Any ideas?
Thanks, Dan
550 file unavailable, user profile has no access
553 could not rename file
Any ideas?
Thanks, Dan
Re: Move Files to another folder
Dan,
Did you just copy and paste my example, or did you change it to accommodate your requirements? What I pasted really is nothing but an example, which should give you some idea of what you should do.
Best,
mark
Did you just copy and paste my example, or did you change it to accommodate your requirements? What I pasted really is nothing but an example, which should give you some idea of what you should do.
Best,
mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Move Files to another folder
No, I put in the file, login and etc into the variables... here is the code, I just xx'ed out the username and password for purposes of posting
Code: Select all
put the cFileName of grp "FileInfo" into theFilename
put "/download/" into theDir
put "/download/processed" into theNewDir
put "67.210.32.14" into myDomain
put "xxxxxx" into tUserName
put "xxxxxx" into tPass
put "RNFR" && theDir & theFilename into myCommand
put libURLftpCommand(myCommand,myDomain,tUserName,tPass) into rslt
answer rslt
put "RNTO" && theNewDir & theFilename into myCommand
put libURLftpCommand(myCommand,myDomain,tUserName,tPass) into rsl
answer rsl
Re: Move Files to another folder
It's working now... once I got the IT guy to give the correct writes to the user and I got my directories correct, the file is being moved.
Thanks for the help, it is greatly appreciated....
Dan
Thanks for the help, it is greatly appreciated....
Dan
Re: Move Files to another folder
Thank for letting me know that it works, Dan. I was just going to look into it.
Best,
Mark
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode