Solved

Copy file while it in use

Posted on 2011-09-22
13
207 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
  • 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Viewers will learn how to use Macros for greater control over Rack parameters in Ableton Live. Group devices into a Rack by selecting them and pressing Command-G (Ctrl-G on PC): Control-click (Right Click on PC) a parameter to access pop-up menu, …

838 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