SirDarknight1200 Posted July 24, 2013 Share Posted July 24, 2013 If I use the following code : Case $msg = $Button6 DirCopy(@HomeDrive & "\Windows\Temp\", @MyDocumentsDir & "\Backup\") Each time the button is clicked, the directory will be recreated,how can I do that if the directory already exists then it won't create another one Link to comment Share on other sites More sharing options...
michaelslamet Posted July 24, 2013 Share Posted July 24, 2013 Hi, The source and destination parameter for DirCopy should not have a trailing backslash, so it should: DirCopy(@HomeDrive & "\Windows\Temp", @MyDocumentsDir & "\Backup") Use FileExists() to check if a file OR directory exists or not Link to comment Share on other sites More sharing options...
SirDarknight1200 Posted July 25, 2013 Author Share Posted July 25, 2013 Also the code doesn't work : DirCopy(@HomeDrive & "\Windows\Temp", @MyDocumentsDir & "\Backup") Link to comment Share on other sites More sharing options...
Solution ripdad Posted July 25, 2013 Solution Share Posted July 25, 2013 Case $msg = $Button6 DirCopy(@WindowsDir & "\Temp", @MyDocumentsDir & "\Backup", 1) "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
SirDarknight1200 Posted July 25, 2013 Author Share Posted July 25, 2013 Thanks a lot! Both of u Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now