How to Create a Temporary File on the Network

Asked

Viewed 104 times

1

I wanted to know how to create a temporary file on the network.

  • Every time the user logs in checks if the file already exists if yes the system creates another file with the different name.

  • Every time the user leaves the system it will erase the file that created and all other files that have the same name Type(File 1, File 2...) that are no longer being used.

  • 1

    It has to be with a temporary file on the network or it can be otherwise?

  • may be otherwise yes.

  • You have to do it like this:;if Usuario = usuarioLoago then
 begin
 for I := 1 to sUsuQtd do
 begin 
 NomeArqivo := 'arquivo'+IntToStr(I)+'.txt'; 
 if not FileExists(NomeArqivo) then
 begin
 AssignFile(Arqivo, NomeArqivo);
 end;
 end; 
 end;

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.