Jump to content











Photo
- - - - -

Winbuilder 082 DirCopy - Unknown error


  • Please log in to reply
6 replies to this topic

#1 misty

misty

    Gold Member

  • Developer
  • 1069 posts
  •  
    United Kingdom

Posted 31 March 2014 - 06:59 PM

Hi,

This question relates to Winbuilder 082.

I'm currently working on a script that will copy the contents of a USB drive to a temporary directory - the stick is then formatted and the contents are copied back.

My host OS is Windows 8.1 (32-bit). When I use the DirCopy command -
DirCopy,"D:\*.*","%BaseDir%\Projects\Cache\usb.contents"
I receive the error
Dircopy - Failed to copy directory [D:\*.*] to: [%BaseDir%\Projects\Cache\usb.contents]: Unknown error
The majority of the files appear to be copied without error. I'm not sure if the problem is due to Winbuilder also copying (attempting to copy) the System Volume Information and/or Recycle Bin directories.

Any suggestions (other than using a different OS)?

I'm not in a position to restore a Windows 7 backup at the moment, however I think this host OS was copying the contents without error, but was then failing to copy the contents back to the USB drive after it was repartitioned and formatted.

Regards,

Misty

#2 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 03 April 2014 - 08:10 PM

how about using something like a ShellExecute command?  You could use robocopy or an XCOPY command to do the copy for you.  Maybe even using something like the "unstoppable" copy program in command line mode...http://www.roadkil.n...hp?ProgramID=29

 

Your right that there was something that gave some sort of an error - like a copy of a protected file or one where there were no permissions, etc.

 

Scott


  • misty likes this

#3 misty

misty

    Gold Member

  • Developer
  • 1069 posts
  •  
    United Kingdom

Posted 04 April 2014 - 05:53 AM

@sbeader
Thanks for the feedback. XCOPY (with the /exclude switch) works ok. Any suggestions for a workaround in WinBuilder that doesn't need to run an external command?

Regards,

misty

#4 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 04 April 2014 - 01:37 PM

Not sure whether is works.

For me, WinBuilder 82 is dead since a while.

So I do not have it anymore to test.

 

Try: DirMake,"%BaseDir%\Projects\Cache\usb.contents"

FileCopy,"D:\*.*","%BaseDir%\Projects\Cache\usb.contents"

 

Peter


  • misty likes this

#5 misty

misty

    Gold Member

  • Developer
  • 1069 posts
  •  
    United Kingdom

Posted 04 April 2014 - 03:24 PM

Thanks Peter.

 

The suggested code copies the contents of the USB drive without errors. The $RECYCLE.BIN and System Volume Information are also copied though, so I suspect that this might cause errors when they are copied back to the USB drive after it's been repartitioned and formatted.

 

Regards,

 

Misty



#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 04 April 2014 - 03:28 PM

The $RECYCLE.BIN and System Volume Information are also copied though, so I suspect that this might cause errors when they are copied back to the USB drive after it's been repartitioned and formatted.

Why not doing some deletes after copy?

 

Peter :smiling9:


  • misty likes this

#7 misty

misty

    Gold Member

  • Developer
  • 1069 posts
  •  
    United Kingdom

Posted 04 April 2014 - 03:53 PM

Hi Peter,

 

Thanks for pointing out what should have been obvious. 

 

:cheers:

 

Regards,

 

Misty






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users