Forum Discussion
Howard
15 years agoNew Contributor
I've come across some other problems with file/folder functions. I've been using aqFileSystem.GetFolderInfo to check whether a folder path (string) corresponds to an actual folder or not. I use something like:
Set folder_obj = aqFileSystem.GetFolderInfo(folder_path)
if folder_obj Is Not Nothing Then
Log.Message("Folder name: " + folder_obj.name)
else
Log.Error("Not a valid folder")
end if
If folder_path is set to something like "c:\temp\file.txt" I was expecting this to trigger the error, but it runs fine and returns "file.txt" as the folder name. Is this expected behaviour? How else can I check that a folder path corresponds to a valid folder?
thanks,
Howard