I wanted to create empty folder in artifactory repo.
I created an empty folder with desired name in local file system and given that path to jf rt u
command.
jf rt u <path/to/empty/folder> <destination/to/artifactory>
But it didn't work. Is there any other way to create empty folders in artifactory repo.
Thanks in advance ...!!
Yes, Artifactory doesn't natively support creating empty folders directly.
One workaround is to create an empty file within the folder and then upload it. You could use a command like
touch
or similar to create an empty file within the folder and then upload that to Artifactory.Here's a step-by-step process in doing so:
On your local system, navigate to the desired folder and create an empty file using the command line. For example:
This command creates an empty file named emptyfile.txt.
Use the jf rt u command to upload the empty file to Artifactory. Modify the command according to your specific paths:
Replace
/path/to/emptyfile.txt
with the actual path to your empty file and with the path where you want to upload the empty file.Once the empty file is uploaded to Artifactory, it will appear as a file. However, since it's an empty file, it effectively creates the appearance of an empty folder within Artifactory.
This method essentially tricks Artifactory into displaying an empty folder by uploading an empty file within it.