Chilkat HOME Android™ Classic ASP C C++ C# Mono C# .NET Core C# C# UWP/WinRT DataFlex Delphi ActiveX Delphi DLL Visual FoxPro Java Lianja MFC Objective-C Perl PHP ActiveX PHP Extension PowerBuilder PowerShell PureBasic CkPython Chilkat2-Python Ruby SQL Server Swift 2 Swift 3/4 Tcl Unicode C Unicode C++ Visual Basic 6.0 VB.NET VB.NET UWP/WinRT VBScript Xojo Plugin Node.js Excel Go
(Tcl) Move File to Another Directory on ServerMoves a file from one directory to another. This is accomplished by renaming the file using a filepath that includes the directory.
load ./chilkat.dll set ftp [new_CkFtp2] # Any string unlocks the component for the 1st 30-days. set success [CkFtp2_UnlockComponent $ftp "Anything for 30-day trial"] if {[expr $success != 1]} then { puts [CkFtp2_lastErrorText $ftp] delete_CkFtp2 $ftp exit } CkFtp2_put_Hostname $ftp "ftp.myFtpServer123.com" CkFtp2_put_Username $ftp "***" CkFtp2_put_Password $ftp "***" # Connect and login to the FTP server. set success [CkFtp2_Connect $ftp] if {[expr $success != 1]} then { puts [CkFtp2_lastErrorText $ftp] delete_CkFtp2 $ftp exit } # Rename the remote file (or directory) set existingFilepath "dirA/hello.txt" set newFilepath "dirB/hello.txt" set success [CkFtp2_RenameRemoteFile $ftp $existingFilepath $newFilepath] if {[expr $success != 1]} then { puts [CkFtp2_lastErrorText $ftp] delete_CkFtp2 $ftp exit } set success [CkFtp2_Disconnect $ftp] delete_CkFtp2 $ftp |
© 2000-2016 Chilkat Software, Inc. All Rights Reserved.