Hi
I've got troubles moving files on a remote computer from one directory to another.
My environment is Windows Vista Business where the VB runs and Windows Vista Home where the share is located on. If I use Windows XP on the remote computer it works.
To enable my NAS I've changed SMB Authentification on Vista.
Here my code:
The first file is moved. Then I get runtime error 52:Bad file or filename on the line where the file is renamed. The cause is that Dir returns the allready moved file again.
I know, I can use Dir() in the loop then all files are moved but when the routine is called again within the next seconds Dir returns the first moved file again. It seems like if Vista needs some time to get aware that the files aren't on the old location any more.
thanks for any help
schweiger
I've got troubles moving files on a remote computer from one directory to another.
My environment is Windows Vista Business where the VB runs and Windows Vista Home where the share is located on. If I use Windows XP on the remote computer it works.
To enable my NAS I've changed SMB Authentification on Vista.
Here my code:
Code:
Dim temp As String
temp = Dir("\\SRV\Test\NEW\*.*")
Do While temp <> ""
[COLOR=blue] Name "\\SRV\Test\NEW\" & temp As "\\SRV\Test\ARCHIV\" & temp[/color blue] ' runtime error 52
temp = Dir("\\SRV\Test\NEW\*.*")
Loop
The first file is moved. Then I get runtime error 52:Bad file or filename on the line where the file is renamed. The cause is that Dir returns the allready moved file again.
I know, I can use Dir() in the loop then all files are moved but when the routine is called again within the next seconds Dir returns the first moved file again. It seems like if Vista needs some time to get aware that the files aren't on the old location any more.
thanks for any help
schweiger