: 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.
: : 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).
: : : 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.
: : : : 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
Comments
:
: 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.
: :
: : 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]
: : :
: : : 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.
: : : :
: : : : 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]