IZBORNIK HOME FORUM ACCESS EXCEL WORD  
 

HOME

   
1 UVOD
2 CMD sintaksa i XP naredbeni interpreter
3 Parametri i Prekidači
4 Kretanje pomoću tipki
5 Podešavanje prozora
6 Zamjenski znakovi
7 Editiranje TXTdatoteka
8 Posebni simboli u CMD naredbi
9 BATCH datoteke u CMD
10 HELP u CMD prozoru
11 ERROR u CMD prozoru
 

-- NAREDBE U  CMD-u --

  ASSOC
  AT
  ATTRIB
  BREAK
  CACLS
  CALL
  CD
  CHCP
  CHDIR
  CHKDSK
  CHKNTFS
  CLS
  CLIP
  CMD
  COLOR
  COMP
  COMPACT
  CONVERT
  COPY
  DATE
  DEL
  DIR
  DISKCOMP
  DISKCOPY
  DOSKEY
  ECHO
  ENDLOCAL
  ERASE
  EXIT
  FC
  FIND
  FINDSTR
  FOR
  FORMAT
  FTYPE
  GOTO
  GRAFTABL
  HELP
  IF
  LABEL
  MD
  MKDIR
  MODE
  MORE
  MOVE
  PATH
  PAUSE
  POPD
  PRINT
  PROMPT
  PUSHD
  RD
  RECOVER
  REM
  REN
  RENAME
  REPLACE
  RMDIR
  SET
  SETLOCAL
  SHIFT
  SORT
  START
  SUBST
  TIME
  TITLE
  TREE
  TYPE
  VER
  VERIFY
  VOL
  XCOPY
   
   
12 PING
13 IPCONFIG
14 NETSTAT
15 ROUTE
16 NSLOOKUP
17 ARP
18 TRACERT
19 TELNET
20 NET Commands
   
 

Adsense sponzor



NAREDBENO SUČELJE (Command Prompt line)

COMP Search This Web Site

Adsense sponzor



 




COMP  (FC)

Radi li se s većim nizovima podataka ili običnim tekstualnim datotekama poželjno je moći usporediti međusobno. Tada se koristi naredba Comp (eng. Compare = usporedi) ili Fc (eng. File Compare = usporedi datoteke).

Uspoređuje sadržaj dvije datoteke ili set datoteka byte po byte

comp [data1] [data2] [/d] [/a] [/l] [/n=number] [/c]

Parametar Značenje
data1 Određuje lokaciju i ime prve datoteke ili grupe datoteka koje se žele usporediti
data2 Određuje lokaciju i ime prve datoteke ili grupe datoteka koje se žele usporediti
/d Prikazuje razlike u decimalnom formatu
/a Prikazuje razlike u znakovnom formatu
/l Prikazuje broj linije u kojoj se pojavljuju razlike
/n=number Uspoređuje red obje datoteke čak i ako datoteke nisu iste veličine
/c Provodi komparaciju neovisno o veličini slova case-sensitive

Primjer: Usporedi sadržaj datoteka dat1.txt i dat2.txt

Rješenje: C:\>fc dat1.txt dat2.txt /a


Compares the contents of two files or sets of files byte by byte. Comp can compare files on the same drive or on different drives, and in the same directory or in different directories. When comp compares the files, it displays their locations and file names. Used without parameters, comp prompts you to enter the files to compare.

Syntax

comp [data1] [data2] [/d] [/a] [/l] [/n=number] [/c]

Parameters

data1

Specifies the location and name of the first file or set of files you want to compare. You can use wildcard characters (* and ?) to specify multiple files.

data2

Specifies the location and name of the second file or set of files you want to compare. You can use wildcard characters (* and ?) to specify multiple files.

/d

Displays differences in decimal format. (The default format is hexadecimal.)

/a

Displays differences as characters.

/l

Displays the number of the line on which a difference occurs, instead of displaying the byte offset.

/n=number

Compares the first number of lines of both files, even if the files are different sizes.

/c

Performs a comparison that is not case-sensitive.

/?

Displays help at the command prompt.

Remarks

  • Comparing files with the same names

The files that you compare can have the same file name, provided they are in different directories or on different drives. If you do not specify a file name for data2, the default file name for data2 is the same as the file name in data1. You can use wildcard characters (that is, * and ?) to specify file names.

  • Special cases for data1 and data2

If you omit necessary components of either data1 or data2 or if you omit data2, comp prompts you for the missing information. If data1 contains only a drive letter or a directory name with no file name, comp compares all of the files in the specified directory to the file specified in data2. If data2 contains only a drive letter or a directory name, the default file name for data2 is the same as that in data1.

  • How the comp command identifies mismatching information

During the comparison, comp displays messages to identify the locations of unequal information in the two files. Each message indicates the offset memory address of the unequal bytes and the contents of the bytes themselves (that is, in hexadecimal notation unless you specify the /a or /d command-line option). The message appears in the following format:

Compare error at OFFSET xxxxxxxx

file1 = xx

file2 = xx

After 10 unequal comparisons, comp stops comparing the files and displays the following message:

10 Mismatches - ending compare

  • Comparing files of different sizes

You cannot compare files of different sizes unless you specify the /n command-line option. If the file sizes are different, comp displays the following message:

Files are different sizes

Compare more files (Y/N)?

Press Y to compare another pair of files. Press N to stop the comp command.

If you press Y in response to the prompt, comp includes any command-line options you specified on the command line in every comparison it makes, until you press N or retype the command.

When comparing files of different sizes, use the /n command-line option to compare only the first portion of each file.

  • Comparing files sequentially

If you use wildcard characters (* and ?) to specify multiple files, comp finds the first file matching data1 and compares it with the corresponding file in data2, if it exists. The comp command reports the results of the comparison, and then does the same for each file matching data1. When finished, comp displays the following message:

Compare more files (Y/N)?

To compare more files, press Y. The comp command prompts you for the locations and names of the new files. To stop the comparisons, press N. When you press Y, comp prompts you for command-line options to use. If you don't specify any command-line options, comp uses the ones you specified before.

  • If comp cannot find the files

If comp cannot find the file(s) you specify, it prompts you with a message to determine whether you want to compare more files.

Examples

To compare the contents of the directory C:\Reports with the backup directory \\Sales\Backup\April, type:

comp c:\reports \\sales\backup\april

To compare the first ten lines of the text files in the \Invoice directory and display the result in decimal format, type:

comp \invoice\*.txt \invoice\backup\*.txt /n=10 /d

 

 

Adsense sponzor



 




Copyright 2009-2017 - IvanC - ic.ims.hr