Solved

Copy file while it in use

Posted on 2011-09-22
13
208 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
convert Photo To exact Size 10 118
Free PDF readers besides Adobe Acrobat 9 68
Certain exe files will not run in Vista 26 46
Morphing two faces into one... 3 24
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…
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 …
Viewers will learn how to turn a Live Set into a compressed Live Pack file, and how to install Live Packs. Make: File > Collect All And Save: File > Manage Files: Click Manage Project: Click Create Pack: Select save location: Install: Doub…
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…

685 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