How to copy files in local folder to sftp using pentaho copy file step - pentaho

I have to copy the files in local folder to sftp location using pentaho.
i have tried with "copy step"step from spoon jobs by providing local path in file/folder source path and sftp details file/folder destination.
while executing i am getting error like "File system exception : could not find file in the files /path".
please let me know how to resolve it.
i did copying files from sftp to local folder using same "copy file" step by proving sftp details in file/folder source path and local path file/folder destination, it is working.
i have defined vfs parameters also in job.
Thanks

You should try the "Get file with SFTP" and "Put file with SFTP" entries instead.
Both have support for authentication via username/password or private key.

"copy files" will not be the best option here.
Try using "Get a file with SFTP"

Related

Copy files from remote to local

I tried to copy the file from remote to my local directory but I am getting an error No such file or directory.
Below is the command I used to copy
scp username#remoteserver.xxx:/path to the file/filename /path to the local directory/
All the paths I copied using pwd.
Do you get "No such file or directory" for the
/path to the file/filename
or the
/path to the local directory/
part? If it's the first, then you might have an issue with the path itself. If it's for the second then specifying localuser#localmachine:/path to the local directory/ might fix it. If you're on the same LAN, you could also try localuser#localmachineip:/path to the local directory/

Copy files from one path to another path in TFVC repository using Powershell

I am trying to copy files from one folder path to another folder path in the TFVC repository using Powershell script in CI as mentioned below.
Get-Item -path $/SCSM/CMC/1.1.0.0/Dev/1.1.1.0/TSC/ServiceRuleScript - Destination $/SCSM/CCB/1.0.0.0/Dev/1.0.1.0/TSC/RulesEngine
When trying the above script getting the below error:
Copy-Item : Cannot find path 'C:\privateagent\_work\66\s\$/SCSM/CMC/1.1.0.0/Dev/1.1.1.0/TSC/ServiceRuleScript
We tried with the copy file task in CI, it is getting executed but we are unable to see the file in the destination folder path
enter image description here
Please help me out with this task.
The problem is that your Source Folder is wrong.
Use this Predefined variables:
$(Build.SourcesDirectory)\{your folder want to be copied}
It works on my side:
We are trying to call file from one path "Masters\DbProject\V1.0.0.1\PowershellScripts
and we are using the copy task to call file in another path "CCM/1.0.0.0/1.1.0.0/Dev/1.1.1.0". Both are different paths. When we are trying to call the file using copy file task getting the below error.
##[error]Unhandled: Not found SourceFolder: C:\privateagent_work\66\s\Masters\DbProject\V1.0.0.1\PowershellScripts
But the file which we are trying to call is in the below path: "C:\privateagent_work\79\s\Masters\DbProject\V1.0.0.1\PowershellScripts
We have mentioned the below path in our copy task
Source folder in copy task - $(Build.SourcesDirectory)\Masters\DbProject\V1.0.0.1\PowershellScripts
The problem here in the copy task is - The copy file task should call file from "C:\privateagent_work\79\s\Masters\DbProject\V1.0.0.1\PowershellScripts" but it is trying to call the file from "C:\privateagent_work\66\s\Masters\DbProject\V1.0.0.1\PowershellScripts
Please share your inputs.

Jenkins Error: fatal error C1083: Cannot open include file: 'xyz.h': No such file or directory

Can any one please tell me how to resolve this kind of error?
This header file placed in different folder and project.sln file present in some other folder. but both folders are present at same master folder like :
Project_Data(main folder)
1. Source_code (project.sln present here)
2. Supported_Files(xyz.h file present here)
and in jenkins i give the svn location of master folder.
Firstly thank you for your response to my question. Now i got the solution of above error.
In this case we can change the location of missing file(i.e which is not found by jenkins while exection) to folder where .sln file placed.We can do this process manually or we can write execution script to automate this process.
Thanks :)

How to copy artifacts folder to ftp folder in TFS?

I'm trying to publish artifacts and it's other folders files as well.I've read all the docs file provide by microsoft from here and used them but none of them worked for me.
I' tried File patterns as
** =>which copied all root files to ftp
**\* => which copied all sub folders file to ftp's root directory.
What I've wanted is copy folder to folder in ftp aswell.
-artifacts ftp
--a.dll --a.dll
--subfolder --subfolder
---subfolder_1.dll ---subfolder_1.dll
what's happening is
ftp
--a.dll
--subfolder_1.dll
It's copying all sub directories file to root directory of ftp.
I've use curl and ftp both giving me same result.
How can i achieve folder to folder copy in TFS 2017.
It's not related File patterns, to upload the entire folder content recursively, simply specify **.
All you have to do is checking the Preserve file paths in Advanced option.
If selected, the relative local directory structure is recreated under
the remote directory where files are uploaded. Otherwise, files are
uploaded directly to the remote directory without creating additional
subdirectories.
For example, suppose your source folder is: /home/user/source/ and
contains the file: foo/bar/foobar.txt, and your remote directory
is: /uploads/. If selected, the file is uploaded to:
/uploads/foo/bar/foobar.txt. Otherwise, to: /uploads/foobar.txt.

iOS save all files from remote directory at local document directory

I am properly sending a nsurlrequest to download a known path file and then save it to document directory. However, now I need to download all files that a remote directory contains. I know path for directory but not which files are inside. How to list that files in order to build paths to download it? Thank you.
Unfortunately unless you parsed a index file containing a list of the files, this is not possible as the HTTP protocol does not support directory listing. You would have to use an FTP server instead