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.


Topics - newbie

Pages: [1]
1
HFS ~ HTTP File Server / HFS Scripting cmd: time and filetime
« on: December 03, 2019, 11:10:31 PM »
I want to figure out the time difference between current server time and filetime of a file.
From https://www.rejetto.com/wiki/index.php/HFS:_scripting_commands
it looks like:
filetime returns a double value based on Delphi time ie days since 12/30/1899
&
time returns a value based on the optional argument (YY:MM:DD:HH:NN:SS) something like 2019:12:03:18:10:59

How can I get both times in one format, so that I can get the time since the file was created on the server.

2
HFS ~ HTTP File Server / Move cmd via curl
« 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:?

3
HFS ~ HTTP File Server / Get Connections
« on: October 23, 2019, 02:18:01 PM »
I notice that the UI displays a table for Connections with 6 entries for one client.
Is there a way for me to get that list of IP addresses via a script?

There doesnt appear to be a GetConnections here:
https://www.rejetto.com/wiki/index.php/HFS:_scripting_commands#Connections_control

4
HFS ~ HTTP File Server / Firing an event on macro completion
« on: October 22, 2019, 08:40:51 PM »
I would like to fire an event to do something (for e.g run exec) when a template script in my DiffTemplates finishes successfully.

For e.g: when exec |myprog.exe| runs and produces a file.ext, then fire an event that will then call another exec to do something with the file.
ie the appearance of the file constitutes an event, upon which some other process works on that file.

I looked at this https://rejetto.com/wiki/index.php?title=HFS:_Event_scripts#Other_events and searched in the forum, but it isnt clear to me how I can fire up my own event and watch for it.

I would really appreciate any help.

Thanks.


5
HFS ~ HTTP File Server / Deploy HFS configuration across various machines
« on: October 22, 2019, 07:31:53 PM »
Hi,
I would like to deploy my current HFS setup across various machines via cmdline.
https://rejetto.com/wiki/index.php?title=HFS:_Command_line_parameters

My setup has a user-password, specific permissions & DiffTemplates, and there isnt any fixed path between different machines...ie 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?

Thanks.

6
HFS ~ HTTP File Server / Macro support for symbolic folders
« on: October 09, 2019, 02:32:17 PM »
Ref: https://www.rejetto.com/wiki/index.php?title=HFS:_scripting_commands
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.

Thanks.

7
HFS ~ HTTP File Server / Executing HFS scripts from curl
« 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.

Pages: [1]