Create a folder on Windows

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Create a folder on Windows

Post by trags3 » Sun Mar 07, 2021 12:54 pm

Trying to create folder in the "Documents" folder on a Windows 10 computer.
I have done this many times on iPhone but something is different on Windows.
Help Please

Tom

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Create a folder on Windows

Post by bogs » Sun Mar 07, 2021 1:11 pm

At least 2 ways come to mind, about the same amount of typing (give or take a few characters).

Method 1 -- set the default folder, then make the new folder...

Code: Select all

set the defaultFolder to specialFolderPath("Documents")
new folder "myNewFolder" -- just use the name, don't add a slash
Method 2 -- put it all on one line...

Code: Select all

new folder (specialFolderPath("Documents") & "/myNewFolder") -- put a slash before the name of your new folder...
Image

trags3
Posts: 418
Joined: Wed Apr 09, 2014 1:58 am
Location: Las Vegas, NV

Re: Create a folder on Windows

Post by trags3 » Sun Mar 07, 2021 1:18 pm

Thanks Bogs!
You have come to my rescue AGAIN!
Tom

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Create a folder on Windows

Post by bogs » Sun Mar 07, 2021 1:21 pm

Heh, no problem, now if I could only save me from myself... :D
Image

Post Reply

Return to “Windows”