rejetto forum

Feature request: HFS Client

waltari · 15 · 11236

0 Members and 1 Guest are viewing this topic.

Offline waltari

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Hello,

I was pondering would it be too difficult to make Commandline client which would know how to interact with HFS.

I think HFS is written with Delphi. If I can get good hint's I could write one my self and publish it.

It would be like

hfsclient.exe /f:"C:\Backups\My Backup.zip" /s:"http://backup.domain.com:21212/client1/backups/" /un:"username" /pw:"password"

And return value of exe regarding if it was successful.

Maybe some /rt:4 to retry 4 times before giving final verdict of was the sending successful or not.

of course some wild card support

hfsclient.exe /f:"C:\Backups\*.zip" /s:"http://backup.domain.com:21212/client1/backups/" /un:"username" /pw:"password"

Any feedback / help is welcome...

-TP-








Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
Im not quite sure what you are trying to achieve with the commandline in hfs but hfs already supports some commands via the commandline.

http://www.rejetto.com/wiki/index.php?title=HFS:_Command_line_parameters
« Last Edit: October 15, 2007, 11:42:32 AM by That_Stevens_Guy »


Offline waltari

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
OK,

Let me try once more, sorry about my bad English...

1. There is HFS-Server running at hfs.mydomain.com
2. I have CLIENT-computer running anywhere in internet
3. I need to send file from CLIENT to HFS from commandline
4. I suggested that I could write an client if there is no one already
   if I just get enough information to do so.

And the "maybe to be made" hfsclient's commandline API I suggested in previous post.

Addition to previous posts there shoud be owerwriteall option, that would overwrite present file, and maybe autorenameifpresent option also, but that discussion I leave for distant future :)

-TP-


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
1. if the browser can send a file, you can too. it's http. in HFS it is called "upload".
2. after the file has been uploaded, on your server there might me a software that makes further manipulations, like moving to another folder.


Offline MarkV

  • Tireless poster
  • ****
    • Posts: 764
    • View Profile
You can use WGet. It may have what you need.
http://worldipv6launch.org - The world is different now.


Offline waltari

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Ok,

I looked at WGet, and it seems (to me) have only downloading features, I need upload.

WPut seems to have only FTP-support.

If someone knows good tool like WPut/WGet which could be used to send/upload files to HFS, I am all ears. If not if someone from HFS team could give some pointers how to implement one. I could do it with Delhi with Indy library.

-TP-


Offline waltari

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Hello,

seems that http://curl.haxx.se/ could do this, I try to look into this, if someone has time/will/stamina/interest, tell me your test results...

-TP-


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
The curl program looks like it can upload to hfs but I dont know what options you have to use in it to do it.

This topic might help [link]http://www.rejetto.com/forum/index.php?topic=4877.0[/link]


Offline waltari

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Hello,

If anyone is interested I am doing one of my own. I think I publish it as Freeware or Opensource, not sure yet.  If you are interested in testing this let me know.

Currently it has following features
 1. Send One file
 2. Credential (username & opassword) support
 3. Should also work without authorization (not tested yet)
 4. All settings can be initialized from commandline
 5. has /autostart parameter which starts sending and closes program automatically
 6. Progressbar / Bytes sent support
 7. Currently hard coded retrying on error (10 times), not thoroughly tested yet
 8. Checks if the file is already at directory, if present gives an error
 9. Should return error level 0..5 on some known situations, and http error codes if
    HTTP related related (like 401 for unauthorized) 

Following features I am going to implement before release.

  1. Sending of multiple files
  2. Wildcard (simple) support to filenames to send
  3. Some configurable incremental wait time on errors
    (if conenction brakes or server is rebootting give server time to do so)
  4. Some minor tweaks
  5. Proxy support (can't test it tough) 

If someone at HFS-developing team is reading this I have couple questions. Howmany files I can send as multipart stram. There is name for that file, I think webform has 8 possible, if I recalll. Is there some upper limit to it (beside client/server machine memory). How I can delete file remotely??

-Tommi Prami-
 


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
I cant help you with your other questions but I can tell you that there is no way to remotely delete files, but it is possible to overwrite files if it is selected in hfs.


Offline Giant Eagle

  • Tireless poster
  • ****
    • Posts: 535
  • >=3 RAWR!
    • View Profile
    • RAWR-Designs.com
I cant help you with your other questions but I can tell you that there is no way to remotely delete files, but it is possible to overwrite files if it is selected in hfs.

It 'is' possible to remotely delete a file. Some while ago i was experimenting with remote folder creation and deletion. The tests were succesfull but since the .VFS file is too complex to decypher on my own :P (damn thou, rejetto), it wasnt able to show the client the actual folder structure of the server.

The method behind it is to have a second server running at the host's end and to connect to that server with special commands.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i guess Foggy meant that it is not possible with just HFS.


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile

Jerico

  • Guest
I've played with this problem in the past, the solution I came up with that worked quite well was to run a ftp server on the same machine and configure it with the same folders etc. I used a freeware ftp server from snapfiles.com, I believe it was called quick and easy ftp server lite, or something like that.  Then, to make sending files to the server easy and somewhat automated, I used a program called "sendtoftp" from the same website, I configured it with the username, password, ftp addy etc, then created a secondary intall for all that data and the config file using installcreator, also from snapfiles.com.

You can play around with it and get the results that best suit you, it's not as complicated as it sounds and works really well, if you have moderate knowledge of hfs and running a ftp server, you should be able to have this up and running in a half hour or less.

Hope this helps,

Kind Regards,

Jerico


Nick

  • Guest
Hey there, I know this post has been over for a while but I was wondering if Jerico could elaborate on what you did. It seems like an interesting idea but I get kinda lost when you talk about a second install and how you connect it all together. Thanks.