Link to home
Start Free TrialLog in
Avatar of Ray Padilla
Ray PadillaFlag for United States of America

asked on

Create a folder on a network drive

Hola Experts,
I've seen this before on here but can't seem to find it....Here's what I'm trying to do.
Need to create an agent that when clicked will look at a field (DirectoryName) and create a folder on the network with that name i.e.
Field Directory contains f:\data\newfoldername\yetanotherfoldername
Click Create Folder button and a folder is created in the background under that drive.
The data folder already exist so it would just have to the subfolder and the folder under that.
so my F drive now has a data folder with a subfolder newfoldername inside that folder I have a folder yetanotherfoldername
Thanks guys and Gals!
ASKER CERTIFIED SOLUTION
Avatar of mbonaci
mbonaci
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ray Padilla

ASKER

Line 12, 20 & 28 all error out
Avatar of mross002
mross002

What is the error, and did you change the path to the folder on your server that you would like to store the files to.  You might also need to enable restricted operations on the agent tab.  
Type mismatch on Targetpath is the error.
I'm trying to create folders on our fileserver \\fileserver\data
Apologies... Dim targetpath as a global variable
Declarations:
Dim TargetPath As String
Target path would be the field I am using to designate the actual folder name correct?!?!? I've tried everything to make this work with no luck...
If you look at the code, TargetPath is a combination of the Root Directory, the parent folder and the sub folder that you want.  

I suspect that you are not running this agent on server.  To write to the server, you have to have the agent run on server, either by scheduling it, or using a call notesagent.runonserver.
Check whether you can create folder manually. If not check user rights on shared folder on destination comp.
I'm an admin, I create delete etc.
Even if you are domain admin you still need to give yourself rights on shared folder (folder properties, sharing tab) explicitly in order to write and modify its contents.
the folder that this folders are being created in is shared for everyone to read and write to....
never did get this resolved but I will close it thanks for the help
thanks guys, but I was not able to get this resolved, I'll try something else later....