How to copy artifacts folder to ftp folder in TFS? - asp.net-core

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.

Related

how to copy all files in a folder recursively in cpanel yml

im currently setting up a cpanel.yml file and i need to copy all the file inside one specific folder in my repository to my /public_html.
/bin/cp -R build $DEPLOYPATH
the code above copy the build folder to the /public_html. But i need to copy all the file inside it not the actual build folder.
any suggestion how to do it? any help would be appreciated. thanks

Determining whether a file is linked to a project or not

I'm writing a project documenter and I write out the full file path of each compiled file. This is for the VB.NET language so .proj files are written in xml.
Any file that is linked to the project exists on the same drive so at least one of the directory levels are the same for all files. I currently have it set up to put the project directory path on files which exist inside the project since it only shows the name of the file and the residing directory it lives in if its in a directory inside the project. For files outside (linked in) to the project I initially saw their files paths were "..\..\..\dir\filename". So I set it up to take off all the "..\" and put the necessary directories in front of it and all that worked fine. Now for this one .proj file some of the linked in files have their full file path with no "..\".
How can I properly distinguish these three possible inputs?
System.IO.Path.IsRooted will tell you whether a path is rooted, i.e. is a full path, or not. If the path is not rooted it is a relative path. You can use Path.Combine to resolve the full path from a relative path.

Overriding the bin directory

I am writing a MSBuild script for creating a one click deployment. Everything works great but the files are created in the app.publish under the bin directory. Is there a way to set the output directory to another directory instead of the default bin directory?
I used PublishDir but that just creates the setup.exe in the specified directory. The other files are still created under the bin directory.
Can route all the one click deployments to a specific directory or do I have to copy later?
Thanks,
Richard.
Have you tried OutputPath instead?
msbuild my_solution.sln /p:OutputPath=c:\my_dir

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

How can I filter which files are included in a workspace using MSBuild?

It seems that MsBuild creates a folder called, "BuildType" on the build server and this folder is where the .proj file is copied. In source control I have several files that are in the same folder as the build project file. I have a workspace mapped to this location.
I would like to be able to specify explicitly which files from this workspace location should be copied to the build machine. Is this possible?
Thanks!
You cannot do this on file level but if you organize your build type folder with subfolders you can cloak the folders that you want to exclude.