Caml Light Posted April 30, 2012 Share Posted April 30, 2012 Hi guys, i need to copy two files from a DVD-R to the %SystemDrive% folder using ROBOCOPY command with a batch file located in the same DVD-R dir of the two files to copyMy problem is that i don't know how specify as source the dir of the batch file...For now this is my script:@SETLOCAL ENABLEEXTENSIONS@CD /D "%~dp0"ROBOCOPY "???" "%SystemDrive%" file1.extROBOCOPY "???" "%SystemDrive%" file2.extFeel free to fully rewrite my batch. Thank you in advance! Link to comment Share on other sites More sharing options...
Yzöwl Posted April 30, 2012 Share Posted April 30, 2012 @ECHO OFF & SETLOCAL ENABLEEXTENSIONSSET "_=%~dp0"ROBOCOPY "%_:~,-1%" "%SystemDrive%" file1.ext file2.ext Link to comment Share on other sites More sharing options...
Caml Light Posted April 30, 2012 Author Share Posted April 30, 2012 Yzöwl, thank you!Cheers Link to comment Share on other sites More sharing options...
Caml Light Posted May 1, 2012 Author Share Posted May 1, 2012 One question... today i've seen this post: http://forums.mydigitallife.info/threads/28118-Windows-Thin-PC-Addon-Packages?p=489108&viewfull=1#post489108Using the previous batch, that works perfectly, is it possible to add the SetupComplete.cmd batch from the posted site? Is it correct for you or it should be modified?Thank you guys Link to comment Share on other sites More sharing options...
Yzöwl Posted May 1, 2012 Share Posted May 1, 2012 There's no reason why you cannot use the DISM command replacing %~dp0 with "%_:~,-1%". You shouldn't need the RD command ife you're running it from optical media which is read only. Link to comment Share on other sites More sharing options...
Caml Light Posted May 1, 2012 Author Share Posted May 1, 2012 (edited) Infact there is no reason to use the RD command running a DVD-R but how could it possible to use both commands (ROBOCOPY and DISM) with the same batch (without RD obviously)? On ss64.com i've read that XCOPY is deprecated with the newer O.S. and we should use ROBOCOPY, but in case of problems i can replace it with the old and simple XCOPY.If you can, could you write an example of a correct SetupComplete.cmd integrating both ROBOCOPY or XCOPY and DISM please? Thanks Edited May 1, 2012 by Caml Light Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now