Topic: CreateDir created "the not killed" directory
It was required to create subdirectory in the existing directory. Wrote the code:
var sDir: String; sDir: = ' C:\Temp\Document1 ';//on the end a gap! if sDir [Length (sDir)] <> ' \' then sDir: = sDir + ' \'; CreateDir (sDir);
The subdirectory has been created, but it appeared that it cannot be deleted. At attempt of removal of a folder with all contents Windows Explorer produces the message "it is not possible to delete a file. It is not possible to produce reading from a file or from a disk." The folder managed to be deleted by means of one of file managers (completely to delete instead of to send in "Basket").
Put in a gap on the end of a name of subdirectory. I can remove, of course, all gaps in the end of folder name before its creation, but it would be desirable to understand, why there is such problem.