rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: newbie on October 23, 2019, 03:56:12 PM

Title: Move cmd via curl
Post by: newbie on October 23, 2019, 03:56:12 PM
I am trying to move some files via a curl cmd.

I am trying the following:
curl -u user:passwd "http://hfserver:280/myData/folder1/folder2/?mode=section&id=ajax.move" --data "dst=folder1/folder3&files=file1.png:file2.png:file3.png:" 
I am guessing the files values are wrong, but I dont know how they should be separated. Is : the right delimiter there?


I see the following code in HFS source:
function selectedFilesAsStr() {
    var a = [];
    selectedItems().each(function(){
        a.push(getItemName(this));
    });
    return a.join(":");
}
So, its an array and there's an ending :
So, thats why I tried
files=file1.png:file2.png:?
Title: Re: Move cmd via curl
Post by: newbie on October 23, 2019, 06:30:33 PM
nm. Got it.
I had the destination wrong.

This works...

curl -u user:passwd "http://hfserver:280/myData/folder1/folder2/?mode=section&id=ajax.move" --data "dst=/myData/folder1/folder3&files=file1.png:file2.png:file3.png"