Krzysztof wrote:
I just quicky googled not allowed characters and wrote this simple function:
function IsValidFilename(const AFilename: String): Boolean;
var
c: set of Char = ['<','>',':','"','/','\','|','?','*', '%', '.'];
i: Integer;
begin
Result := True;
for i:=1 to Length(AFilename) do
if AFilename[i] in c then
Exit(False);
end;
So, problem solved. Thanks and regards
But several of those are fine in filenames- just inadvisable since they
need special quoting/escaping to get past the shell. As does ' ' which
isn't in your list :-)
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal