Solved

Copy file while it in use

Posted on 2011-09-22
13
204 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
 

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In a previous article published here at Experts Exchange, Signature Image with Transparent Background (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_12380-Signature-Image-with-Transparent-Background.html), I explained how to cre…
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…
Viewers will learn the basics of creating custom device Racks in Ableton Live. Place instrument(s) and effects onto a track, and select them all by holding the Shift key and clicking on the device title bars: Group them by typing Command-G (Ctrl-G…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now