Help - Search - Members - Calendar
Full Version: Percentage Complete Coding for CMD?
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   
Google Internet Forums Unattended CD/DVD Guide
RaynotRoy
When I copy the i386 directory to the hard drive during setup, it takes a REALLY long time, and i was just wondering if there was any way for it to tell me how much is left to copy in the CMD prompt. Any thoughts?
Sonic
If you copy the directory manually in true dos mode you must use smartdrv.exe before the copy command ...

Goodbye.
RaynotRoy
Im not using true DOS, im looking for a counter in the cmd prompt that tells me how much copying is done. ex.

NOW COPYING THE i386 DIRECTORY TO %SYSTEMDRIVE% ...... ??% Complete.

What command will tell me how complete it is?
eagle00789
QUOTE (RaynotRoy @ Oct 24 2005, 01:30 PM) *
Im not using true DOS, im looking for a counter in the cmd prompt that tells me how much copying is done. ex.

NOW COPYING THE i386 DIRECTORY TO %SYSTEMDRIVE% ...... ??% Complete.

What command will tell me how complete it is?

i can be very short about this.

Nothing. you can't see that
MadBoy
It is possible ;p I found it on some website, so the code isn't mine...

CODE
@Echo Off
::Copy the first file.
  Call :Pcopy "source 1" target1 /Options
::Copy the second file.
  Call :Pcopy source2 "target 2" /Options
(Goto :EOF)

:Pcopy
  Set Flagfile=%TEMP%.\%RANDOM%.tmp
  If Exist %Flagfile% Del %Flagfile%
  Start /Min Copy %* ^& Echo.^>%Flagfile% ^& Exit
(Set /P i=Copying %1) < NUL
:Pcopy1
  If Exist %Flagfile% (Goto :EOF)
::Echo period w/o carriage return/line feed
(Set /P i=.) < NUL
::Wait one second (increase no. of ping requests
::in order to wait for a longer time)
  Ping -n 2 127.0.0.1 > NUL
  Goto Pcopy1


Hope it helps...
Yzöwl
QUOTE (eagle00789 @ Oct 24 2005, 08:07 PM) *
i can be very short about this.

Nothing. you can't see that
What about this then? Click to view attachment It is a cmd file without third party tools etc. which I have wrote as an example. It works fine on my test systems.

Just make sure that there's enough space on your system drive, pop your CD-ROM in, stop it spinning up, unpack the file, double click and watch!

Regards
glent
Very nice Yzöwl ! thanks dude
RaynotRoy
Thanks so much man, thats absolutly AMAZING. good work.
Yzöwl
I know, it even impressed me!

I could have stopped at just answering the request, but percentage, number of files to copy, number copied, source and destination names and a progress bar…

I'm just too kind yes.gif
Incroyable HULK
QUOTE (Yzöwl @ Oct 30 2005, 05:46 PM) *
I know, it even impressed me!

I could have stopped at just answering the request, but percentage, number of files to copy, number copied, source and destination names and a progress bar…

I'm just too kind yes.gif


Trully impressed! ph34r.gif

Do you think it would be possible to adapt this script to move some big files, like a ISO, by checking the total size of the file to be transfered?
MioKawaii
QUOTE (Yzöwl @ Oct 31 2005, 07:46 AM) *
I know, it even impressed me!

I could have stopped at just answering the request, but percentage, number of files to copy, number copied, source and destination names and a progress bar…

I'm just too kind yes.gif

You never fail to impressed me. thumbup.gif thumbup.gif thumbup.gif
gunsmokingman
Here a vbs file that uses the built in move copy graph from windows.
I have It set to Copy the XP CD to %Systemdrive%

QUOTE
Dim Act, CD, Fso, Folder, Shell, SD, strCd
Set Act = CreateObject("Wscript.Shell")
Set Fso = CreateObject("Scripting.FileSystemObject")
SD = Act.ExpandEnvironmentStrings("%Systemdrive%")
set Shell = CreateObject("Shell.Application")

Function CD_Copy
Set CD = Fso.Drives
For Each strCd In CD
If strCd.DriveType = 4 Then
If Fso.FileExists(strCd & "\win51") Then
Act.Popup "This Is A XP CD, " & strCd ,5,"Confirm XP CD", 0 + 32
Copy_XP
Exit Function
Else
Act.Popup "This Is Not The Correct CD",5,"Incorrect CD", 0 + 32
End If
End If
Next
End Function

Function Copy_XP
If Not Fso.FolderExists(SD & "\XPCD") Then Fso.CreateFolder(SD & "\XPCD") End If
set Folder = Shell.NameSpace(SD & "\XPCD")
if not Folder is nothing then
Folder.CopyHere(strCd & "\..\*.*")
set Shell = nothing
set Folder = nothing
End If
End Function

CD_Copy
Bilou_Gateux
QUOTE (Yzöwl @ Oct 25 2005, 05:19 PM) *
QUOTE (eagle00789 @ Oct 24 2005, 08:07 PM) *
i can be very short about this.

Nothing. you can't see that
What about this then? Click to view attachment It is a cmd file without third party tools etc. which I have wrote as an example. It works fine on my test systems.

Just make sure that there's enough space on your system drive, pop your CD-ROM in, stop it spinning up, unpack the file, double click and watch!

Regards

@Yzöwl
Nice script. thumbup.gif It runs under WinPE after adding required files (not third party tools but OS command line tools) find.exe and mode.com in my image. but takes too much time from copying files one by one rather than *.*

@gunsmokingman
I would like to try your script but using a network drive (or HDD in external enclosure) as source instead of CD Drive. could the code been changed for checking the ident file on these installation media like S:\WIN51
BoardBabe
Ok here comes a n00b shoot question, why would you copy i386 during setup?
gunsmokingman
This can be any drive letter as the scripts looks for an instance of that file.
(strCd & "\win51"), strCd is the array that holds the drive letters for CD or DVD
drive.
Here how I tested the script, I first place a XP Cd in my real drive then it copy it
to the XPCD, I then ejected the CD and mounted a ISO image of XP in a Virtual
drive the script reported the real CD drive as incorrect but started the copy from
virtual drive next.
So the drive letter does not matter as it will go threw all CD or DVD drive letters.
Until a true statement exists, if nothing is found then the script will keep reporting
Incorrect CD until all the CD or DVD drives in the array are finished.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.