exist dir
2 отговора
0 прегледа
exist dir
Къде да прочета за следното:
Искам да правя проверка дали съществува директория с име '2006' например и ако не да създам такава и после да правя копи на файлове от друга
Гледах за ExtractFileDir, но мискля че не ми върши работа, защото предварително не ми е известен пътя ....
Искам да правя проверка дали съществува директория с име '2006' например и ако не да създам такава и после да правя копи на файлове от друга
Гледах за ExtractFileDir, но мискля че не ми върши работа, защото предварително не ми е известен пътя ....
Може и да не си тъп :)
Може и да не си тъп :)
Има и ForceDirectories
Creates all the directories along a directory path if they do not already exist.
Unit
FileCtrl
Category
file management routines
function ForceDirectories(Dir: string): Boolean;
Description
DOS and Windows only allow directories to be created one at a time. For example, to create the C:\APPS\SALES\LOCAL directory, the APPS and SALES directories must exist before the LOCAL directory can be created. Use ForceDirectories to create a directory and all parent directories that do not already exist.
ForceDirectories returns True if it successfully creates all necessary directories, False if it could not create a needed directory.
Note: Do not call ForceDirectories with an empty string. Doing so causes ForceDirectories to raise an exception.
Има и ForceDirectories
Creates all the directories along a directory path if they do not already exist.
Unit
FileCtrl
Category
file management routines
function ForceDirectories(Dir: string): Boolean;
Description
DOS and Windows only allow directories to be created one at a time. For example, to create the C:\APPS\SALES\LOCAL directory, the APPS and SALES directories must exist before the LOCAL directory can be created. Use ForceDirectories to create a directory and all parent directories that do not already exist.
ForceDirectories returns True if it successfully creates all necessary directories, False if it could not create a needed directory.
Note: Do not call ForceDirectories with an empty string. Doing so causes ForceDirectories to raise an exception.