Solved

Copy file while it in use

Posted on 2011-09-22
13
210 Views
Last Modified: 2012-08-14
I am  using a video program which create a temporary avi file during recording. I cant copy that file until the video is done. Is it possible i can copy that temporary file during recording ? I try it but it gives error file in use

Thanks.
0
Comment
Question by:mustish1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
13 Comments
 
LVL 18

Assisted Solution

by:web_tracker
web_tracker earned 50 total points
ID: 36584452
YOu can not copy a file when it is in use or until changes are complete. If you want to copy the file you have to stop the recording process save it then continue recording. The file would probably be corrupted if you were able to copy it while recording.
0
 
LVL 66

Accepted Solution

by:
johnb6767 earned 450 total points
ID: 36584664
Havent tested this, but I thought I would look around. Volume Shadow Copy is used by some backup apps, to copy open files. I found this (googled, I admint it), but didnt test.....

Script recipe of the week: how to copy an opened file
http://blogs.msdn.com/b/adioltean/archive/2005/01/05/346793.aspx

As long as you are copying a COMPLETE file, and not one being built/converted etc. I would be curious to see if it works.
0
 

Author Comment

by:mustish1
ID: 36593409
Why i get that error
error.jpg
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:mustish1
ID: 36593411
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36594279
Change %~dp0\vshadow.exe to %~dp0vshadow.exe

In the screenshot, it looks like it is appearing with an extra "\".....
0
 

Author Comment

by:mustish1
ID: 36601070
It still given me error
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36694277
Whats the error this time?
0
 

Author Comment

by:mustish1
ID: 36710486
setlocal

@REM test if we are called by VSHADOW
if NOT "%CALLBACK_SCRIPT%"=="" goto :IS_CALLBACK

@REM
@REM Get the source and destination path
@REM

set SOURCE_DRIVE_LETTER=%~d1
set SOURCE_RELATIVE_PATH=%~pnx1
set DESTINATION_PATH=%2

@REM
@REM Create the shadow copy - and generate env variables into a temporary script.
@REM
@REM Then, while the shadow is still live
@REM recursively execute the same script.
@REM

@echo ...Determine the scripts to be executed/generated...

set CALLBACK_SCRIPT=%~dpnx0
set TEMP_GENERATED_SCRIPT=GeneratedVarsTempScript.cmd

@echo ...Creating the shadow copy...

%~dp0vshadow.exe -script=%TEMP_GENERATED_SCRIPT% -exec=%CALLBACK_SCRIPT% %SOURCE_DRIVE_LETTER%

del /f %TEMP_GENERATED_SCRIPT%

@goto :EOF

:IS_CALLBACK
setlocal

@REM
@REM This generated script should set the SHADOW_DEVICE_1 env variable
@REM

@echo ...Obtaining the shadow copy device name...

call %TEMP_GENERATED_SCRIPT%

@REM
@REM This should copy the file to the right location
@REM

@echo ...Copying from the shadow copy to the destination path...

copy "%SHADOW_DEVICE_1%\%SOURCE_RELATIVE_PATH%" %DESTINATION_PATH%

error2.jpg
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36714404
Is vshadow.exe at the root of the C Drive?

I am guessing you didnt download it?

From link above....

"Now, what is this vshadow.exe tool? It is a simple command-line tool that allows anyone to create shadow copies. You can find the tool already compiled in the latest downloadable VSS SDK. Just copy VSHADOW.EXE in the same directory as the CMD above"

It is here....

Volume Shadow Copy Service SDK 7.2
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23490
0
 

Author Comment

by:mustish1
ID: 36892074
I installed the program. Copy file on the root vshadow.exe but it still gives error.
vsh1.JPG
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36895535
You copied the one from the release-xp folder to the C:\? Found an article specifying this errpr is common if using the wrong version....  Look for the one that is 288kb....

0
 

Author Comment

by:mustish1
ID: 36896361
I have windows XP. Can you please send me the link
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 36907698
Referring to the folder in your screenshot...... you already had it in your download...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
Viewers will learn the basics of using Ableton Live's advanced sampler instrument, Sampler. Load new Sampler into an empty MIDI track: Select a sample and drop it into sample window in Sampler: Adjust pitch if necessary with Root Key setting: …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question