?
Solved

Copy file while it in use

Posted on 2011-09-22
13
Medium Priority
?
212 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 200 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 1800 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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 

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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

PaperPort 14.5 Patch 1 update is often not detected or downloaded automatically. This article provides direct download links to solve the problem for retail (non-bundled) versions of the Standard and Professional editions, as well as the Professiona…
This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
Learn how to automatically add page numbers in your next InDesign project. This can be very helpful in multi-page books and magazines that you are designing. Make sure your Pages window visible.:  In the document you wish to add page numbers to. Act…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

719 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