Commande COPY sous bloc-notes

Résolu
GOLDEN_HUNTER Messages postés 73 Date d'inscription   Statut Membre Dernière intervention   -  
GOLDEN_HUNTER Messages postés 73 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour, je suis en train de créer un programme :) ... dans la liste de commandes ce programme doit se copier vers une destination précise mais ça ne marche pas :(
J'ai trouvé ce site http://www.easydos.com/copy.html mais je n'y comprends rien
Pouvez vous s'il vous plait m'expliquer à quoi servent les [Y| -Y] [A] [B] ( Path ... etc )

Merci beaucoup :) pour votre aide



A voir également:

2 réponses

radgeur Messages postés 201 Date d'inscription   Statut Membre Dernière intervention   27
 
Bonjour,
tout est détaillé sur le site que tu donne pourtant :


Options

/Y - Causes COPY to replace existing files without providing a confirmation prompt. By default, if you specify an existing file as the destination file, COPY will provide a confirmation prompt. (In previous versions of DOS, existing files were simply overwritten.)

/-Y - Displays a confirmation prompt before copying over existing files.

/A - Used to copy ASCII files. Applies to the filename preceding it and to all following filenames. Files will be copied until an end-of-file mark is encountered in the file being copied. If an end-of-file mark is encountered in the file, the rest of the file is not copied. DOS will append an end-of-file mark at the end of the copied file.

/B - Used to copy binary files. Applies to the filename preceding it and to all following filenames. Copied files will be read by size (according to the number of bytes indicated in the file's directory listing). An end-of-file mark is not placed at the end of the copied file.

/V - Checks after the copy to assure that a file was copied correctly. If the copy cannot be verified, the program will display an error message. Using this option will result in a slower copying process.
0
GOLDEN_HUNTER Messages postés 73 Date d'inscription   Statut Membre Dernière intervention   1
 
mais je ne comprends pas pk ça ne marche pas
Moi programme c'est un fichier Batch ... je l'éxécute mais il ne se copie pas
je me suis peut être trompé en tapant le code dans Notepad

Pourrais tu me donner un éxemple ? stp
0
radgeur Messages postés 201 Date d'inscription   Statut Membre Dernière intervention   27
 
Donne nous ton code toi plutôt que l'on puisse essayer de t'aider et de te faire avancer stp.
0
GOLDEN_HUNTER Messages postés 73 Date d'inscription   Statut Membre Dernière intervention   1
 
je te préviens je suis nul ^^

@echo off
copy c:\Program Files\ FICHIER 1; d:\FICHIER 2
ping localhost -n4 * nul
cls
quit
0
radgeur Messages postés 201 Date d'inscription   Statut Membre Dernière intervention   27
 
alors, je remarque 2 choses,
tout d'abord, il ne me semble pas qu'il y ait besoin d'un ; avec le premier chemin, ensuite le premier chemin et peut-être le deuxième je ne sait pas doivent être encadré de " car lorsqu'il y a des espaces dans les noms de dossiers ou de fichiers, il n'est pas capable de les trouver sinon.
Ensuite, je ne comprend pas pourquoi tu effectue une requête ping, un cls et un quit?
0
GOLDEN_HUNTER Messages postés 73 Date d'inscription   Statut Membre Dernière intervention   1
 
moi aussi je ne comprend pas pk je le fais
0
GOLDEN_HUNTER Messages postés 73 Date d'inscription   Statut Membre Dernière intervention   1
 
Juste pour copier un fichier de son emplacement vers un autre endroit

Comment doit être le code ?? ( psk j'ai éssayé @echo off
copy c:\Program Files\ FICHIER 1; d:\FICHIER 2 ... sans le cls et quit .. mais ça ne marche pas )

remarque : quand y a des éspaces je crois qu'on utilise les <>
0