OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

how to check for existing directories?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
michael1982
Newbie
Newbie


Joined: 19 Feb 2007
Posts: 1

PostPosted: Mon Feb 19, 2007 11:40 am    Post subject: how to check for existing directories? Reply with quote

hi there,
i am looking for a way to check if directories exist.
For example:
Code:

Sub ExampleFilecopy
Filecopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"
end sub

when i want to copy the file into "c:\temp"there have to be a dir called temp, without it
it wouldn't work.
my question is how to check for existing dirs.
i played a little bit with pickfolder, but had no success!?
http://www.oooforum.org/forum/viewtopic.phtml?t=9797
Thx
Michael
Back to top
View user's profile Send private message
Mark B
Super User
Super User


Joined: 16 Feb 2007
Posts: 852
Location: Lincolnshire, UK

PostPosted: Mon Feb 19, 2007 11:53 am    Post subject: Reply with quote

Code:

Sub ExampleFilecopy
if ( Dir("/tmp") <> "") then
  Filecopy "c:\autoexec.bat", "c:\Temp\Autoexec.sav"
end if
end sub


Mark
_________________
Mark B's Articles
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group