Does the Create Folder activity do some form av precheck before creating a folder.
Lets say I use the Create Folder activity and I pass this to the input:
C:\Folder1\Folder2\Folder3\Folder4\Folder5
If “Folder1” and “Folder2” exists will it create a “copy(1)” or overwrite it or will it ignore to create “Folder1” and “Folder2” and just create “Folder3”, “Folder4” and “Folder5”?
Dont really want it to make a mess of my paths and such.
It doesnt overwrite the Folders. I’m just a little bit scared if it can make a mess later on.
Why even use Path Exists activity in this scenario or is it used for something else?
Folder 1 and folder 2 if exists, it will overwrite
for example if i have a already existing folder
“C:\Users\palan\Desktop\Folder1\Folder2\Folder3\Folder4\Folder5\test”
and if i mention the same in CREATE FOLDER activity as input, then it will not overwrite nor recreate the existing folder
it will leave as it is.
if we mention a different folder name atlast like this
“C:\Users\palan\Desktop\Folder1\Folder2\Folder3\Folder4\Folder5\test_1”
then it will create a new one.
suppose if you dont have any of the subfolders along the path, that is here
“C:\Users\palan\Desktop\Folder1\Folder2\Folder3\Folder4\Folder5\test”
if we miss FOLDER1 and mentioned in input, then it will create from folder1
from Folder1\Folder2\Folder3\Folder4\Folder5\test it wont throw any error
it will still create the folder structure newly
hope this would help you and as you said no need of PATH EXISTS here when you are using CREATE FOLDER.
well i just checked again and validated with time when the file was last created
to be exact, if the folder already exists then it is overwriting rather it is leaving as it is as the folder exists
say for example
i created this folder for first time
“C:\Users\palan\Desktop\Folder1\Folder2\Folder3\Folder4\Folder5\test”
around 20:05 and once after running i saw the folder creation time as same 20:05
again i kept this string as input and tried to run CREATE FOLDER around 20:06
and when i ran it was still showing only 20:05 which means folder is not recreated nor overwritten
hope its clear now on this part. i have updated my previous comment as well
This means that the “Create Folder” Activity is “smart” and cant really mess up the folders in a path.
To simplify it. “Create Folder” does not replace or overwrite already existing folders. Can we agree on this?
And then the question is, what is the point of the “path exists” activity other the using it in special scenarios.
I mean one does not really need to use path exists to verify if a folder exist before creating a a new one or the same folder again because it does not overwrite it?
I have also played with the “ContinueOnError” setting in the Create Folder activity and I cant really see any difference when it is checked/unchecked or when it has the default setting.
PATH EXISTS is usually used when someone wants to validate whether a folder exists or not before creating it and it is applicable for both files and folders as well. And it depends on scenario, say for example if someone wants to fetch a file from folder once after that file is downloaded but would like to validate whther the file is there or not, there comes PATH EXISTS
or if someone wants to see if folder exists first or if not will need to send a mail or need to log that as a log message, then a boolean value is needed which is given only with PATH EXISTS activity
and for continuous on error, usually it has to be used if you are not surrounding the activity within TRY CATCH to ensure that bot executes fine even if that CREATE FOLDER Activity fails
and it would fail in case like suddenly your access to create a new folder is denied in the folder structure where you are trying. Then bot will throw an error and it makes a difference there on checking that option