rejetto forum

How to rename the upload file

0 Members and 1 Guest are viewing this topic.

Offline trpsjt2008

  • Occasional poster
  • *
    • Posts: 13
    • View Profile
Hi I just start using HFS 2 day ago i use upload to contact with my friend  on grade 8
i use My Program On vb.net Be a file watcher in Upload folder
i want to know who is the uploader by renaming the file to filename + _username
i don't Know how to handle Template

How can i rename the file before upload


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Welcome trpsjt2008 ! :)

Rename the file after upload:

1 - Use a beta version of HFS
2 - You type : ALT + F6
2 - You copy the following code in the file that appears:

[+upload name]
%user%_%item-name%


You save and close the file.

You can invert as %item-name%_%user% if you want, but you "enclose" the file extension.
« Last Edit: October 07, 2010, 03:05:28 AM by SilentPliz »


Offline trpsjt2008

  • Occasional poster
  • *
    • Posts: 13
    • View Profile
Thanksssssssssssssssssssssssๆๆๆๆๆๆๆๆๆๆๆๆ

Can i use
Code: [Select]
@%user%@%item-name%does @ symbol affect anything?
this for my program
Get the uploader of file and save data XML
rename the file back
In VB.net
Use FileWatcher if any file upload it will get the data then record and rename back

how can i edit user manually with program where is it? not with HFS
because i want to make registration throught my program by uploading userdata throught site



One More Question
Did i use english correctly? I'm Thai


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Can i use
Code: [Select]
@%user%@%item-name%does @ symbol affect anything?

Yes you can use this symbol. There is no problem.
(no symbol is also possible)

how can i edit user manually with program where is it? not with HFS
because i want to make registration throught my program by uploading userdata throught site

I'm not sure to understand what you want to do. If someone has an answer ...

One More Question
Did i use english correctly? I'm Thai

I understood two questions on three ... you get more than the average ... just like me. :D
« Last Edit: October 07, 2010, 02:46:01 AM by SilentPliz »


Offline trpsjt2008

  • Occasional poster
  • *
    • Posts: 13
    • View Profile
Ok Second Question :
Where does the HFS Store Username  and password in my computer i want to change them Manually


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
In Expert mode:

Menu > Save options > To file...

An file named hfs.ini will be created in the folder of hfs.exe

Accounts line is:

accounts=...



Offline trpsjt2008

  • Occasional poster
  • *
    • Posts: 13
    • View Profile
Encrypted or Something
account data has been encrypted
Are there Anysetting that encrypt the account data
 :)


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
The format is a standard "base64".
PsPad can encode and decode this format; Notepad++ can decode it.

But it's possible to add a new account by just appending this (plain) text to the "accounts=" line
;login:myusername:mypassword

myusername & mypassword will be encoded once rewritten by HFS in the .ini file.
« Last Edit: October 07, 2010, 02:17:08 PM by SilentPliz »



Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
as far as i can remember, you can read the ini file, but if HFS is running you can't just write to it, because changes are lost.

your program should read from the ini (just the first time)
then it processes the accounts line, builds the new one, then it should call

hfs -c accounts=xxxxxxxxxxxxxxxxxxxxxxx


Offline trpsjt2008

  • Occasional poster
  • *
    • Posts: 13
    • View Profile