rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - newbie

Pages: 1 2 3
HFS ~ HTTP File Server / Deploy HFS configuration across various machines
« on: October 22, 2019, 07:31:53 PM »
I would like to deploy my current HFS setup across various machines via cmdline.

My setup has a user-password, specific permissions & DiffTemplates, and there isnt any fixed path between different the only constant is that the data folder will be relative to hfs.exe.

I have tried the following:
1. F:\HFS\hfs.exe -a myhfs.ini F:\HFS\myData
This adds the myData  folder alright, but it doesnt have any of the permissions or DiffTemplates.

2. After saving the vfs to a myHFS.vfs, I tried
D:\Blah1\Blah2\Blah3\HFS\hfs.exe -a D:\Blah1\Blah2\Blah3\HFS\myHFS.vfs
It doesnt work, when run on a machine that doesnt have an F: drive.
It only works on the original machine since an inspection of the vfs shows that the path is hardwired to F:\HFS\myData

Is there any way to do this?


HFS ~ HTTP File Server / Re: Macro support for symbolic folders
« on: October 11, 2019, 01:23:16 PM »
Sweet! That worked. Thanks for (all) your help Mars.

HFS ~ HTTP File Server / Re: Macro support for symbolic folders
« on: October 10, 2019, 01:20:06 PM »
Thank you Mars.

So, this snippet didnt work:
{.set|cmd|{fsutil reparsepoint query {.^x.}| find "Symbolic Link" > nul && echo symlink || echo notsymlink}.}

but when I moved the fsutil to a windows.bat file (like the following), it did what I wanted to do:
{.exec|CheckSymlink.bat {.^x.}|out=#output.}
So, I'm guessing I messed up the syntax of that exec line in the first snippet.

But, I have another question:
By the way, fsutil assumes the "TestSymFolder" folder lives in the cwd where hfs.exe was executed from.
My HFS env is this:
F:\TestHFS\data is published to <HFS>/test/
F:\TestHFS\data\TestSymFolder is the symbolic linked folder which I am querying.

When I call force ansi
{.set|x|{.force ansi|%folder%{.^x.}.}.}
& use that with fsutil, the folder isnt found cause fsutil is looking at /test/TestSymFolder at the root of the F: drive.

Q: So, is there a macro to get the fully-qualified path to the root of the shared HFS folder i.e F:\TestHFS\data
so that I can supply fsutil with a path like: <FQPath>/TestSymFolder

Thank you.

HFS ~ HTTP File Server / Re: Macro support for symbolic folders
« on: October 09, 2019, 03:10:58 PM »
Thanks for responding Mars.

external program? Ok. like the following e.g?

If I type this in a cmd prompt:
fsutil reparsepoint query TestSymFolder | find "Symbolic Link" > nul && echo symlink || echo notsymlink

then it returns back the output:

Then, how would I call fsutil in the following macro that goes into Properties:DiffTemplate:

[ajax.getfileattr|no log]
{.check session.}
{.set|x|{.force ansi|%folder%{.^x.}.}.}
{.break|if={.not|{.exists|{.^x.}.}.}|result=not found.}
{.break|EXEC FSUTIL && output==symlink | result=symlink.} <===SYNTAX?
{.add to log|User %user% get file attrs for "{.^x.}".}

Also, when my input is a non-symbolic-link folder, the above code returns "file".
Is something wrong with my syntax for this line:

HFS ~ HTTP File Server / Macro support for symbolic folders
« on: October 09, 2019, 02:32:17 PM »
I see the following:
exists | A
checks A for existence, may it be a file or folder.
is file | A
checks A for existence as a file.

and I have been able to use them in Properties:DiffTemplate to check if something is a file or folder.

However, I have not been able to check if a folder is a symbolic link.
Is there a undoc'ed macro for that? Or some other way to do this.
Cause a Search of the forum shows lots of hits for "islink", but it looks like its src code from some .pas file.


HFS ~ HTTP File Server / Re: Executing HFS scripts from curl
« on: October 07, 2019, 03:23:52 PM »
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?


HFS ~ HTTP File Server / Re: Executing HFS scripts from curl
« on: October 04, 2019, 01:43:24 PM »
DJ, Thanks for your response.

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.

HFS ~ HTTP File Server / Executing HFS scripts from curl
« on: October 03, 2019, 03:10:29 PM »
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.


Pages: 1 2 3