Copy files from one remote directory to another remote directory on the same server
I want to copy and move files from one remote directory ( ) to another remote directory ( ) on the same remote server.
I tried to use session.DuplicateFile but it only let me copy one file only.
My directories on the remote:[/code]
I tried as:
However, log says:
pwd
< 2020-06-17 11:04:13.853 Script: /
> 2020-06-17 11:04:16.815 Script: put -nopermissions -preservetime -transfer="binary" -filemask="|*/" -- "/Test/*.txt" "/KMPTest/"
< 2020-06-17 11:04:16.866 Script: No file matching '/Test/*.txt' found. (System Error. Code: 3.
Note that works fine, with the same specification:
.
Both of the above command works if I specify a local directory for the .
Also, GetFiles copies files to my local executable directory, ignoring /KMPTest on the remote.
Where may be I am going wrong to make Work?
Thank you,
Kishor
/Test
/KMPTest
I tried to use session.DuplicateFile but it only let me copy one file only.
My directories on the remote:[/code]
Root --> / Source Directory --> /Test integrationShareDir --> /KMPTest
PutFiles
transferResult = session.PutFiles(sourceDirectory + "/*.txt", integrationShareDir+ "/", false, transferOptions);
pwd
< 2020-06-17 11:04:13.853 Script: /
> 2020-06-17 11:04:16.815 Script: put -nopermissions -preservetime -transfer="binary" -filemask="|*/" -- "/Test/*.txt" "/KMPTest/"
< 2020-06-17 11:04:16.866 Script: No file matching '/Test/*.txt' found. (System Error. Code: 3.
Note that
MoveFile
session.MoveFile(sourceDirectory + "/*.txt", integrationShareDir + "/");
Both of the above command works if I specify a local directory
C:\Temp
integrationShareDir
Also, GetFiles copies files to my local executable directory, ignoring /KMPTest on the remote.
Where may be I am going wrong to make
PutFile
Thank you,
Kishor