FSO and "Permission Denied" error

Richie(UK)

MrExcel MVP
Joined
May 17, 2002
Messages
3,329
Hi all,

I'm using the File System Object to move some folders. The method has worked fine when transferring folders within the C: drive.

However, I now wish to move folders to an external drive. Excel gives an error message number 70 (Permission Denied) whenever I try this. Has anyone any idea why this happens and, more importantly, how I can get round it.

There haven't been many posts on this subject (3 in total) - the closest appears to be this (unresolved) one:
http://www.mrexcel.com/board/viewtopic.php?topic=14076&forum=2

For your information, the external source I am trying to use at the moment is a 3.5" Floppy Drive. (Just to cover the basic question first, Yes it does have a disk in it, Yes it is write enabled, Yes it has been formatted, and Yes it does have space on it :wink: )
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Ivan F Moala

MrExcel MVP
Joined
Feb 10, 2002
Messages
4,209
What code are you using ??
I got this to work ?

<pre/>
Sub TesterI()
Dim Fso

On Error GoTo ErrObj:
Set Fso = CreateObject("Scripting.FileSystemObject")

Fso.CopyFolder "C:AAAA", "A:"

Set Fso = Nothing

Exit Sub
ErrObj:
MsgBox Err.Number & vbCr & Err.Description, vbCritical

End Sub
</pre>
 

Richie(UK)

MrExcel MVP
Joined
May 17, 2002
Messages
3,329
Hi Ivan,

I was a little worried when I tried your code and it didn't work! Anyway, added a backslash after the A: and that did the trick.

In my particular case I am using 'move' rather than 'copy' - when I substitute this into your example routine I get the same error : 70 Permission Denied. :confused:
 

Richie(UK)

MrExcel MVP
Joined
May 17, 2002
Messages
3,329

ADVERTISEMENT

Nope, afraid not.
 

Jack in the UK

Well-known Member
Joined
Feb 16, 2002
Messages
3,215
Hi Richie(UK)

Rem then dos days we all struggled to write batch commands/folders/files to make codes run why the 386 blew up!!

Well back then i never goy moves to work on broken OPS, even now when XP Pro dies i boot in floopy and recover in dos from a magic flop i have made, i copy not more no delete not any complex just level in and copy to XXXX or partition where ever and wipe it and BANG uop and running sweet!

So do the same copy over and kill on the rebound and see if it works, as in in selfcontained codes ??? no drammas as short as is long, no one will know and will be more stable as well, apid will be bit more code tesat exists and blar blarrrrrr!

Try it and can modify later, i feel this OLD ways are cool even in XP world.

PS top secret.. did you know XP Pro have no boot disk?? So how do you do it, well techi heads will know win98me have the core you require and funny as it sounds that one 3.5 flop will boot XP, odd eh!

Also MSCDEX ??? Yuck! us Oakman instead from ME, about the only goodie in 98 series.
 

XL-Dennis

Well-known Member
Joined
Jul 27, 2002
Messages
1,920
Jack,

PS top secret.. did you know XP Pro have no boot disk??

Yes, but we can create ower own lovely DOS-startdisk :)

- Put a 3.5 flop in the floppy-unit and start the Explorer.
- Right click on the A-unit choose Format.
- Check the option "Create a DOS...."
- Klick Start and then OK
- When the formatting is finish click twice OK.

Now we have a DOS-startflop for XP :)

Kind regards,
Dennis
 

Richie(UK)

MrExcel MVP
Joined
May 17, 2002
Messages
3,329
Hi all,

Jack - great minds think alike! (or is it simple minds rarely differ? :wink: ) I was thinking of 'copy' and 'delete' as an alternative to 'move'. And guess what ... it works! :biggrin:

I'd still love to know what the heck all that Permission Denied nonsense was about though. Please, if anybody stumbles across an answer to this - let me know.
 

Forum statistics

Threads
1,144,765
Messages
5,726,164
Members
422,659
Latest member
RGP268

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
Top