Unable to use the "Dir" function for a FTP folder with Excel VBA

flextexmex

New Member
Joined
Mar 12, 2015
Messages
1
Hi,

I'm using the "Dir" function to determine if a specified folder exists on my pc locally and if not I create a new one with that name:

If Len(Dir(Path, vbDirectory)) = 0 Then

MkDir Path

End If

For example Path = "C:\list\doesthisfolderexist"

It is working fine. But now I wanted to use this function for a FTP folder that is already connected to windows 7.

For example with this FTP Path = "ftp://123.123.123.123:321/list/doesthisfolderexist" it does not work.

Of course I copied the filepaths to my explorer to check if they are correct and it is working fine.

Can someone tell me why the "Dir" function is working with my local filepath but not with the ftp filepath?

Thank you!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top