Re: Moving folders with SHFileOperation

From: Vertuas (vertuas_at_[nospam)
Date: 03/10/05


Date: Thu, 10 Mar 2005 00:32:34 GMT


"Tom de Neef" <tdeneef@qolor.nl> wrote in message
news:422f649a$0$28978$e4fe514c@news.xs4all.nl...
> "Vertuas" <vertuas@[nospam]callistocs.freeserve.co.uk> schreef in bericht
> news:b6IXd.235$ox4.212@newsfe4-gui.ntli.net...
> > Hi eveeryone,
> >
> > ShFileperation() is causing me great problems at the moment. my
> > application
> > has to export its data folders to a USB hard disk or flash disk for
backup
> > purposes.
> >
> > I am trying ito achieve this using ShFileOperation
> >
> > my application checks the size fo the folder, by iterating subfolders
and
> > files, to ensure that it fits on the drive before attempting to copy.
> > This
> > works fine.
> >
> > THe folders seam to copy alright, but windows cannot remove the source
> > folder as it says it is in use by another program or person (???!!!??).
> >
>
> Could it be that that 'other process' is your own application? That the OS
> hasn't yet finalized the copy operation and thus keeps the folder locked.
> Maybe there is a message to actually remove such a lock.
> Just an idea: what happens when you insert a sleep before the remove
> statement?
>
> Tom
>
>

Hello Tom,

I am using shfileoperation with FO_MOVE. there is no remove statement as
such as it is part of what windows does

always hated Shfileoperation but short of iterating and copying every file
in every folder manually, i can't see any other alternative.

Kind regards

Vertuas



Relevant Pages

  • Re: Intresting behavior
    ... Go read the doc on SHFileOperation and more specifically on SHFILEOPSTRUCT. ... There is even a flag to NOT move the folder with the files. ... If file connection is enabled, when you move or copy the HTML file, ... if you move the folder with the related files, the HTML file is also moved. ...
    (microsoft.public.windows.file_system)
  • Re: Permissions Dont Propogate
    ... Tom Bell wrote: ... > When the net admin creates a folder on file server and authorizes me Full ... > Control at the folder and all sub-objects, ... Microsoft Windows 2000/NT MVP ...
    (microsoft.public.windows.server.general)
  • Re: Intresting behavior
    ... > Go read the doc on SHFileOperation and more specifically on ... > There is even a flag to NOT move the folder with the files. ... and check out the fact that the word 'files' in the html ... If file connection is enabled, when you move or copy the HTML ...
    (microsoft.public.windows.file_system)
  • Re: New Version of OE to solve XPSP2 problem?
    ... The folder hierarchy you lose is the folders in OE, not Windows. ... "Tom" wrote in message ... the DBX files are hidden in Win2K, ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: sfc /scannow
    ... SC Tom wrote: ... This sfc /scannow setup worked fine until recently. ... Now, however, I am asked to place my Windows XP Pro SP3 CD in the drive when the scan is about half way through this procedure. ... Could it be that the i386 folder has a problem included in it, and, if so, how do I fix that problem? ...
    (microsoft.public.windowsxp.general)