Jump to content

creating directories from a list.

Recommended Posts

Hey Guys,

has been a little while since using autoit, just wanting to check im not missing something here?

Or can i not use dircreate in a way like this... have a list of names, wanting to create folders from said list.

Also tried using serverpaths didnt work :(

error: (11) : ==> Error parsing function call.:

;;creating lots o folders!
#include <Excel.au3>

$oExcel = _Excel_Open()
$wkbk = _Excel_BookOpen($oExcel,"\\fbnecl3\inzb\Documents\Content Support\Tom\Automation\Autoit Test Scripts\foldernames.xlsx")

For $i = 1 To 490 ;Loop
$location = _Excel_RangeRead($wkbk, default,"a"&$i, 1)
$name = _Excel_RangeRead($wkbk, default,"b"&$i, 1)
   dircreate("q:\Documents\HGIF\South Pac\"&$location&"\"&$name&"\"

Edited by 13lack13lade

Share this post

Link to post
Share on other sites

meh just manipulated excel so that i could just get "dircreate("&cells in excel to give file path") in a massive list so i could copy and paste into autoit then just run it like that..

Curious as to why the above didnt work though..

Share this post

Link to post
Share on other sites

I can't currently check to be sure, but I'm fairly certain you can't have a trailing backslash on a folder name.

Other than that, it could only seemingly be the values you are reading in.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.


What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)


Share this post

Link to post
Share on other sites

I tried it without the trailing backslash and still no dice. i had to manually od it like this (snippet below): which was easy enough to do using excel but yeah just scratching my head as to why it didnt work..

dircreate("\\fbnecl3\inzb\documents\hgif\Fiji\The Pearl South Pacific\")
dircreate("\\fbnecl3\inzb\documents\hgif\Fiji\Tropica Island Resort\")
dircreate("\\fbnecl3\inzb\documents\hgif\Fiji\Uprising Beach Resort\")
dircreate("\\fbnecl3\inzb\documents\hgif\Fiji\Viwa Island Resort\")
dircreate("\\fbnecl3\inzb\documents\hgif\Fiji\Volivoli Beach\")
dircreate("\\fbnecl3\inzb\documents\hgif\Fiji\Vomo Island Resort\")
dircreate("\\fbnecl3\inzb\documents\hgif\Fiji\Yasawa Island Resort & Spa\")

I didnt miss anything did i? lol theoretically it should of worked? if so maybe something to look into..

Share this post

Link to post
Share on other sites


not sure if you noticed this but your missing your trailing ")"

in this line - just tested and works fine...

dircreate("q:\Documents\HGIF\South Pac\"&$location&"\"&$name&"\"

you also missspelled South Park  ;)



Edited by l3ill

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...