LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Check directory permissions

Okay. Thank you.

On Mar 23, 10:54 am, Dave Peterson wrote:
Then I'd test it with a testfile.





Dave T wrote:

When the initial dialogue that let's them select their output
directory comes up I'd like it to warn them immedeately if they picked
a directory that they shouldn't have.
The script is producing a few hundred little text files, and I'd like
it to be more "fire-and-forget". So if there is something quick and
easy, I'd rather do that at the start than have to trap an error and
force the user to pay attention after the setup.


On Mar 22, 6:48 pm, Dave Peterson wrote:
Why not just check for an error after they (try to) save the file--why bother
with the test file?


Dave T wrote:


I've got a little script which needs to put it's output in a user-
specified directory and I'd like to make sure that the user has
permission to write to the directory before letting the script try.


I've seen some posts which suggest trying to write a file to the
directory first, while other suggested using GetAtrr(). GetAtrr()
only seems to want to tell me that the specified directory is in fact
a directory.


Is there a simple way to check that the user has write permissions or
am I better off try to write a file and trapping that error?


--


Dave Peterson


--

Dave Peterson- Hide quoted text -

- Show quoted text -





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking for File/Directory Permissions Nigel Excel Programming 1 January 16th 07 07:50 AM
Check a file in a directory Rich Cooper Excel Programming 2 May 18th 04 08:56 PM
How to check if a folder/directory exist using VBA wellie Excel Programming 1 March 1st 04 02:24 AM
How to check if the directory exists? ira Excel Programming 2 January 19th 04 01:22 PM
Check if directory empty OR no of files in directory. Michael Beckinsale Excel Programming 2 December 4th 03 10:12 PM


All times are GMT +1. The time now is 10:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"