MSFN Forum: Xcopy Vs Copy - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Xcopy Vs Copy or can i use RunOneEX? Rate Topic: -----

#1 User is offline   XKnoppix 

  • Member
  • PipPip
  • Group: Members
  • Posts: 207
  • Joined: 15-February 04

Posted 20 March 2005 - 03:25 PM

i'm writing a batch file to copy a few files over... What is the difference between using xcopy vs copy in a batch file? and do i need quotes over paths? Or... does anyone know how to copy files using my RunOnceEX file? i want to copy

%CDROM%\Applications\CDRWIN\Cdrwin.dat

to

%systemdrive%\CDRWIN3\

This will automatically register my application. What is the easiest way to do this? i would like to do it via the runonce ex, but if not what's some good batch commands?

Thanks alot


#2 User is offline   WwTIPPYwW 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 330
  • Joined: 15-February 04

Posted 20 March 2005 - 04:43 PM

just run the BAT file from the cd - why copy it over?

#3 User is offline   XKnoppix 

  • Member
  • PipPip
  • Group: Members
  • Posts: 207
  • Joined: 15-February 04

Posted 20 March 2005 - 07:41 PM

It's a "dat" file. And the program needs that file.. it holds all the registration info specific to my license. So what is better? Xcopy or Copy in batch (cmd) files?

Thanks

#4 User is offline   betamax 

  • Member
  • PipPip
  • Group: Members
  • Posts: 103
  • Joined: 11-March 05

Posted 20 March 2005 - 07:58 PM

copy does a shallow copy (doesn't recurse into sub directories) while xcopy has the option to do a rescursive copy which will copy all files and subfolders within the target folder that you are copying. if you're just copying one single file, either one will suffice.

#5 User is offline   XKnoppix 

  • Member
  • PipPip
  • Group: Members
  • Posts: 207
  • Joined: 15-February 04

Posted 20 March 2005 - 11:07 PM

Thanks exactly what i was looking for.. now i need some syntax help? Where do you use quotes? is it...

XCOPY "%CDROM%\Applications\CDRWIN\Cdrwin.dat" "%systemdrive%\CDRWIN3\"


or...

XCOPY %CDROM%\Applications\CDRWIN\Cdrwin.dat %systemdrive%\CDRWIN3\


without quotes?

Thanks

#6 User is offline   tjhart85 

  • Member
  • PipPip
  • Group: Members
  • Posts: 193
  • Joined: 14-September 04

Posted 20 March 2005 - 11:52 PM

Either one should be sufficient. There shouldn't be any spaces in the variables, so, you can use quotes if you want, or you can not use quotes if you would prefer.

I personally always use quotes, just cause I feel its a good habit to get into, like pushin the clutch down when you brake, its not something thats always needed, but when it is need, it is important!

#7 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 8,322
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 21 March 2005 - 12:02 AM

Just use a SFX winrar file very easy to do that way!!!

#8 User is offline   XKnoppix 

  • Member
  • PipPip
  • Group: Members
  • Posts: 207
  • Joined: 15-February 04

Posted 21 March 2005 - 12:25 AM

kelsenellenelvian: how do i do that?

#9 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,351
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 21 March 2005 - 02:25 AM

Use The Copy Cmd To Copy One File

Quote

Copies one or more files to another location.

COPY [/D][/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
    [+ source [/A | /B] [+ ...]] [destination [/A | /B]]

  source      Specifies the file or files to be copied.
  /A          Indicates an ASCII text file.
  /B          Indicates a binary file.
  /D          Allow the destination file to be created decrypted
  destination  Specifies the directory and/or filename for the new file(s).
  /V          Verifies that new files are written correctly.
  /N          Uses short filename, if available, when copying a file with a
              non-8dot3 name.
  /Y          Suppresses prompting to confirm you want to overwrite an
              existing destination file.
  /-Y          Causes prompting to confirm you want to overwrite an
              existing destination file.
  /Z          Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.  Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.

To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).

copy /y "%CDROM%\Applications\CDRWIN\Cdrwin.dat" "%systemdrive%\CDRWIN3\"


#10 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 8,322
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 21 March 2005 - 02:47 AM

XKnoppix, on Mar 21 2005, 12:25 AM, said:

kelsenellenelvian: how do i do that?
<{POST_SNAPBACK}>



Right click on the file/s or folder/s you want to be placed after installation.
Select "add to archive" in winrar check the boxe that says "create sfx archive".
Next click advanced tab and choose "SFX options"
The next box will have a Path to extract box.
Put where you want the file in this box ie... c:\windows\system32
All variables can be used in this section also like %systemroot%, %Userprofile%.
Now go to the modes tab and check the options of "hide all" and "overwrite all files"
Click ok
then ok again.


Now all you have to do is call the sfx file from guironeonce or wherever. No switches are needed and the sfx is COMPLETLY silent!!!!!!!!!

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy