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 - ubay25

Pages: 1
1
HFS ~ HTTP File Server / Re: scripts to make my life easier!
« on: June 10, 2011, 10:21:41 AM »
Quote
3. i'm always happy when i see people scripting with HFS, despite its poor language.

Thanks rejetto, I admire your humility!
I will work and try what you suggested so that I don't have to use an external app next time.

Anyway, I am attaching the perl script I made for other people who might be interested. You must have the code below in hfs.event:

Quote
[every 2 seconds]
{.load|automatic.txt.}
{.delete|automatic.txt.}

Script might be dirty, I'm not good at it!

2
HFS ~ HTTP File Server / Re: scripts to make my life easier!
« on: June 10, 2011, 08:21:30 AM »
Perfect! Thanks raybob!  :)

3
HFS ~ HTTP File Server / Re: scripts to make my life easier!
« on: June 09, 2011, 03:21:09 PM »
Are you serious? I hope you're joking.

Anyway, I managed to create a script (perl) that lets you (on the command line) define the $name variable and then outputs the commands to automatic.txt which then HFS executes on hfs.event.

One more question though, on the {.set item} command, how can I tell it to make the folder "Non Browseable"?

Many thanks!

4
HFS ~ HTTP File Server / Re: scripts to make my life easier!
« on: June 07, 2011, 03:19:52 PM »
After a bit of searching on the forums I fond out about hfs.event and can use this code:

[every 2 seconds]
{.load|automatic.txt.}
{.delete|automatic.txt.}

The automatic.txt I came up with looks like this:

{.mkdir|C:\MainFolder\$name.}
{.mkdir|C:\MainFolder\$name\Public.}
{.add folder|real|C:\MainFolder\$name|/MainFolder/$name.}
{.add folder|real|C:\MainFolder\$name\Public|/MainFolder/$name/Public.}
{.new account|$name|password=password|enabled=true|member of=can change password.}
{.set item|/MainFolder/$name|hide=0|access=$name|delete=$name|upload=$name.}
{.set item|/MainFolder/$name/Public|hide=1|access=@anyone|delete=$name|upload=@anyone.}

2 Questions:
- Where or how do I define the $name variable?
- Are the commands on the script correct?

5
HFS ~ HTTP File Server / scripts to make my life easier!
« on: June 07, 2011, 01:57:51 PM »
Firstly, thank you for this brilliant software!

Now the problem, my tree structure is like this --> ROOT - MainFolder - UserFolder.
The "UserFolder" folder is a real folder named after a user account, so the user "John" has his folder named "John" (i.e. ROOT - MainFolder - John) which only he has access rights.
So I need to create about a hundred accounts with their own folders and permissions.

The script I can imagine will do this:
- %user% string (i.e. John)
- mkdir C:\MainFolder\%user%
- create account in HFS for %user%
- create %user% folder in HFS with the proper permissions for %user%

Any ideas or tips to get me started? Thanks you in advance!!!

6
HTML & templates / default template build 279
« on: June 06, 2011, 01:18:48 PM »
I am using the default template on build 279 and after adding the folders, accounts, etc. it now displays weird (attached). Any ideas what's happening? Thanks!

Pages: 1