Check If file directory exists, if does not exists create directory

 3 Replies
 2 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
agersh
Veteran Member Send Private Message
Posts: 81
Veteran Member
Using V10 IPA is it possible to check if a network directory exits? If the directory does not exist then create the directory on the network drive?
David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
Using the Sys Cmd node

You can get a list of network drives by using
net use > mapped_drives.txt should dump a list of mapped drives to the text file mapped_drives.txt
and then reading that file to search for your mapped drive.

If not found, use
net use z: \\remotepc\sharename
To create the map

It all depends upon your user access, of course

https://superuser.com/que...nd-line-to-text-file
https://www.windows-comma...-drive-command-line/
David Williams
agersh
Veteran Member Send Private Message
Posts: 81
Veteran Member

David, Thank you for the reply.

I was hoping that I could have used possibly something like the File Access node to check if the subdirectory existed. And create the subdirectory if it did not exist.  

Kyle Jorgensen
Veteran Member Send Private Message
Posts: 122
Veteran Member
If you're not in the cloud, you can use a system command. For unix (korn shell) the command is:

[code] if [ -de /directory/path/] then do something fi [/code]

I'm not a windows person, but I would bet DOS offers something similar.