Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with copying *.*

Status
Not open for further replies.

Zeroanarchy

Technical User
Jun 11, 2001
630
AU
Ok wondering if anyone else has tried this? or has a better method of doing it?


Picturenames.text = c:\pic\*.*
txtPPCDBpicout.text = \photo\*.*

Private Sub Form_load()
Dim intRetVal4 as Interger

intretVal14 =DEVICETODESKTOP(picturenames.text,
"",False, True, txtPPCDBpicout.text)
If intretval4 <>0 then
Msgbox :Error:201&quot;
Else
End if


At the moment it does not seem to like the *.* value any other ideas??

Thanks
[afro]ZeroAnarchy
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.

 
I dont know what DEVICETODESKTOP does,
but if you just want to copy files:

strFromPath =&quot;C:\somewhere strToPath =&quot;D:\ToSomeWhere
strFile = Dir$(&quot;*.*&quot;)
Do
If strFile = &quot;&quot; Then Exit Do
Err=0
FileCopy strFromPath & strFile, strToPath & strFile
'-- use this to Move file
If Err = 0 Then
Kill strFromPath & strFile
End If
'-- end Move file
strFile = Dir$'-- take the next one
Loop

®od Steel


®od
--------------------------------------some Music?
 
Your right Silverside I left out the Module information, here it is:

delcare function DEVICETODESKTOP Lib &quot;adofiltr.dll&quot;_
(ByVal desktoplocn as String, _
ByVal Tablelist as String, _
ByVal sync As Boolean, _
ByVal overwrite As Integer, _
ByVal devicelocn as String) As Long


The prob I have is there is no drive letter for this one hence the \photo\*.* I am trying to copy an entire directory from the portable system to the desktop, any ideas??

Thanks
[afro]ZeroAnarchy
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top