Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

hiding files

_yilmaz_yilmaz Member Posts: 150
Hello,

How can I hide
some necessary data files that the program
uses when it is executed?

Comments

  • zibadianzibadian Member Posts: 6,349
    : Hello,
    :
    : How can I hide
    : some necessary data files that the program
    : uses when it is executed?
    :
    :
    You need to use the FileSetAttr() and FileGetAttr() procedures. Below is a small peace of code, which will hide a file with its name stored in the variable filename:
    [code]
    FileSetAttr(Filename,FileGetAttr(Filename)+faHidden);
    [/code]
    Check the help files for more info on these two functions.
  • netgertnetgert Member Posts: 331
    : : Hello,
    : :
    : : How can I hide
    : : some necessary data files that the program
    : : uses when it is executed?
    : :
    : :
    : You need to use the FileSetAttr() and FileGetAttr() procedures. Below is a small peace of code, which will hide a file with its name stored in the variable filename:
    : [code]
    : FileSetAttr(Filename,FileGetAttr(Filename)+faHidden);
    : [/code]
    : Check the help files for more info on these two functions.
    :

    Correction:
    instad of adding use OR-ing

    And this actually doesn't hide the file. It's only invisible if "Show hidden files" is turned on. Norton AV uses some kind of code to hide the files (quarantine).

    [hr][red][italic][b]N[/b][/red][blue]et[/blue][red][b]G[/b][/red][blue]ert[/italic][/blue][hr]

  • zibadianzibadian Member Posts: 6,349
    : : : Hello,
    : : :
    : : : How can I hide
    : : : some necessary data files that the program
    : : : uses when it is executed?
    : : :
    : : :
    : : You need to use the FileSetAttr() and FileGetAttr() procedures. Below is a small peace of code, which will hide a file with its name stored in the variable filename:
    : : [code]
    : : FileSetAttr(Filename,FileGetAttr(Filename)+faHidden);
    : : [/code]
    : : Check the help files for more info on these two functions.
    : :
    :
    : Correction:
    : instad of adding use OR-ing
    :
    : And this actually doesn't hide the file. It's only invisible if "Show hidden files" is turned on. Norton AV uses some kind of code to hide the files (quarantine).
    :
    : [hr][red][italic][b]N[/b][/red][blue]et[/blue][red][b]G[/b][/red][blue]ert[/italic][/blue][hr]
    :
    I think, you mean if the "Show hidden files" is turned off. And adding is the same as OR-ing in this case.
  • netgertnetgert Member Posts: 331
    : : : : Hello,
    : : : :
    : : : : How can I hide
    : : : : some necessary data files that the program
    : : : : uses when it is executed?
    : : : :
    : : : :
    : : : You need to use the FileSetAttr() and FileGetAttr() procedures. Below is a small peace of code, which will hide a file with its name stored in the variable filename:
    : : : [code]
    : : : FileSetAttr(Filename,FileGetAttr(Filename)+faHidden);
    : : : [/code]
    : : : Check the help files for more info on these two functions.
    : : :
    : :
    : : Correction:
    : : instad of adding use OR-ing
    : :
    : : And this actually doesn't hide the file. It's only invisible if "Show hidden files" is turned on. Norton AV uses some kind of code to hide the files (quarantine).
    : :
    : : [hr][red][italic][b]N[/b][/red][blue]et[/blue][red][b]G[/b][/red][blue]ert[/italic][/blue][hr]
    : :
    : I think, you mean if the "Show hidden files" is turned off. [red]And adding is the same as OR-ing in this case.[/red]
    :

    It's not if the file's attribute already contains faHidden!
    Adding would produce undesireable results

    [hr][red][italic][b]N[/b][/red][blue]et[/blue][red][b]G[/b][/red][blue]ert[/italic][/blue][hr]

  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    _______ // http://forcoder.org // free video tutorials and ebooks about < Visual Basic .NET, JavaScript, PL/SQL, Assembly, C, Go, Python, C#, PHP, R, Swift, Java, Delphi, Ruby, Visual Basic, MATLAB, Objective-C, Perl, Scratch, C++ VBScript, SAS, ML, Transact-SQL, Rust, LabVIEW, Bash, Erlang, Lisp, Hack, Apex, ABAP, Julia, Scheme, Prolog, D, Crystal, Awk, Lua, Fortran, COBOL, Dart, Alice, FoxPro, Clojure, Kotlin, Ada, Scala, Logo, F# /> __________

Sign In or Register to comment.