rejetto forum

Move cmd via curl

newbie · 2 · 2562

0 Members and 1 Guest are viewing this topic.

Offline newbie

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
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:?


Offline newbie

  • Occasional poster
  • *
    • Posts: 39
    • View Profile
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"