Sign in to follow this  
Followers 0
eJan

How can add message for @error in DirCopy()

7 posts in this topic

I need help with failure or success in DirCopy()

I'm tring to copy dir to removable HD but when the HD is unplugged it looks like coping were O.K.

DirCopy("E:\Tweak", "G:\Local Disk E\Tweak", 1)
    If @error Then
        MsgBox(0, "", "Error")
    Exit
    EndIf

Share this post


Link to post
Share on other sites



maybe use drivegetstatus() to verify that the drive is connected ... before you try to copy

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thanks Valuater

Will try, but same thing if source dir doesn't exist.

Maybe You can point me how to use @error flag correctly?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

if Not FileExists("E:\Tweak") then

message box

exitLoop

EndIf

yep...OK

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

i use this

; check if exists @homedrive\temp\
DirGetSize(@HomeDrive & "\Temp\")
If @error= 1 Then
    DirCreate(@HomeDrive & "\Temp\")
EndIf

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

O.K. thanks again, I will try in the morning with more If... - they killing me but ..that's only good way.

Share this post


Link to post
Share on other sites

sorry i didn't find any error codes for DirCopy() ( or know many )

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0