rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: newbie on October 03, 2019, 03:10:29 PM
-
Hello,
How do I execute a HFS script from curl.
For e.g to create a folder, the HFS:_scripting_commands doc says that I need to use the script: mkdir|foldername
So, how do I use it in curl. I am trying to create a folder called: hfsserver:port/Parent/Child
I tried:
curl -u user:passwd hfsserver:port/Parent/ -XPOST -d "{mkdir|Child}"
and it didnt work.
Thanks.
-
welcome,
I searched on the forum (http://rejetto.com/forum/index.php?topic=11299.msg1058722#msg1058722) for you
curl "http://localhost/test/?mode=section^&id=ajax.mkdir" --data "name=Child"
-
DJ, Thanks for your response.
So,
This didnt work:
curl "http://localhost/test/?mode=section^&id=ajax.mkdir" --data "name=Child"
but this did:
curl "http://localhost/test/?mode=section&id=ajax.mkdir" --data "name=Child"
Note the lack of the character ^
I think this gives me a good start on the rest of my reqs. The mkdir was the easiest of my req.
I think the HFS & its scripting capabilities is a powerful tool, but it would be really helpful, if there is an example section in the documentation describing how to get started after settings up the HFS server.
And, I am not talking about just to doing it on curl. There is a lot of documentation & snippets on the forum, but it wasnt clear to me how to get started in the first place.
-
Welcome ! :)
https://rejetto.com/wiki/index.php?title=Main_Page
https://rejetto.com/wiki/index.php?title=HFS:_Template_macros
https://rejetto.com/wiki/index.php?title=HFS:_Event_scripts
https://rejetto.com/wiki/index.php?title=HFS:_scripting_commands
...
-
the holy grail or the cherry on the cake
http://rejetto.com/forum/index.php?topic=1939.0
;D
-
Thank you Mars & SilentPliz for those links. Thats a lot of doc/information.
I have another question:
Does HFS support querying a path to check if its a:
- file
- folder
- symbolic link
And, if so how?
Thanks