mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:25:48 +00:00
[CMD][CMDUTILS][REPLACE] Make 'replace' command external (#7097)
JIRA issue: CORE-9444 - Delete 'replace' internal command. - Add 'replace' external command into base/applications/cmdutils/replace folder. - Add control break handler.
This commit is contained in:
parent
3dcae2ce0c
commit
1ffce3eb6d
57 changed files with 1786 additions and 870 deletions
8
base/applications/cmdutils/replace/CMakeLists.txt
Normal file
8
base/applications/cmdutils/replace/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
||||
|
||||
add_executable(replace replace.c util.c replace.rc)
|
||||
set_module_type(replace win32cui UNICODE)
|
||||
target_link_libraries(replace conutils ${PSEH_LIB})
|
||||
add_importlibs(replace user32 msvcrt kernel32)
|
||||
add_cd_file(TARGET replace DESTINATION reactos/system32 FOR all)
|
55
base/applications/cmdutils/replace/lang/cs-CZ.rc
Normal file
55
base/applications/cmdutils/replace/lang/cs-CZ.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Czech resource file
|
||||
* TRANSLATOR: Copyright 2015 Radek Liška (Black_Fox) <radekliska@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Replaces files.\n\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Specifies the source file or files.\n\
|
||||
[drive2:][path2] Specifies the directory where files are to be\n\
|
||||
replaced.\n\
|
||||
/A Adds new files to destination directory. Cannot\n\
|
||||
use with /S or /U switches.\n\
|
||||
/P Prompts for confirmation before replacing a file or\n\
|
||||
adding a source file.\n\
|
||||
/R Replaces read-only files as well as unprotected\n\
|
||||
files.\n\
|
||||
/S Replaces files in all subdirectories of the\n\
|
||||
destination directory. Cannot use with the /A\n\
|
||||
switch.\n\
|
||||
/W Waits for you to insert a disk before beginning.\n\
|
||||
/U Replaces (updates) only files that are older than\n\
|
||||
source files. Cannot use with the /A switch.\n"
|
||||
STRING_REPLACE_HELP2 "Source path required\n"
|
||||
STRING_REPLACE_HELP3 "No files replaced\n"
|
||||
STRING_REPLACE_HELP4 "%lu file(s) replaced\n"
|
||||
STRING_REPLACE_HELP5 "Replacing %s\n"
|
||||
STRING_REPLACE_HELP6 "Replace %s\n"
|
||||
STRING_REPLACE_HELP7 "No files added\n"
|
||||
STRING_REPLACE_HELP8 "%lu file(s) added\n"
|
||||
STRING_REPLACE_HELP9 "Add %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Replace %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Adding %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Neplatný přepínač - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Cesta nenalezena - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Název souboru, adresáře nebo popisek svazku je neplatný.\n"
|
||||
STRING_REPLACE_ERROR4 "Neplatná kombinace parametrů\n"
|
||||
STRING_REPLACE_ERROR5 "Přístup odepřen - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Nebyly nazeleny žádné soubory - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Rozšířená chyba 32\n"
|
||||
|
||||
STRING_COPY_OPTION "ANV"
|
||||
STRING_COPY_ERROR1 "Chyba: Nelze otevřít zdroj - %s!\n"
|
||||
STRING_COPY_ERROR3 "Chyba při zápisu do cíle!\n"
|
||||
STRING_CONSOLE_ERROR "Neznámá chyba: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Chyba - nedostatek paměti.\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Pokračujte stisknutím libovolné klávesy . . . "
|
||||
END
|
57
base/applications/cmdutils/replace/lang/de-DE.rc
Normal file
57
base/applications/cmdutils/replace/lang/de-DE.rc
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: German (Germany) resource file
|
||||
* TRANSLATORS: Copyright 2005 Klemens Friedl <frik85@gmail.com>
|
||||
* Copyright 2007 Daniel Reimer <reimer.daniel@freenet.de>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Ersetzt Dateien.\n\n\
|
||||
REPLACE [Laufwerk1:][Pfad1]Dateiname [Laufwerk2:][Pfad2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [Laufwerk1:][Pfad1]Dateiname [Laufwerk2:][Pfad2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[Laufwerk1:][Pfad1]Dateiname Bezeichnet die Quelldatei(en).\n\
|
||||
[Laufwerk2:][Pfad2] Bezeichnet den Pfad in dem die Dateien ersetzt\n\
|
||||
werden sollen.\n\
|
||||
/A Fügt neue Dateien dem Zielpfad hinzu. Kann nicht\n\
|
||||
mit /S oder /U Parameter genutzt werden.\n\
|
||||
/P Wartet auf Bestätigung bevor eine Datei ersetzt\n\
|
||||
oder eine Quelldatei hinzugefügt wird.\n\
|
||||
/R Ersetzt schreibgeschützte Dateien.\n\
|
||||
/S Ersetzt Dateien in allen Unterordnern des Ziel-\n\
|
||||
pfades. Kann nicht mit Parameter /A genutzt\n\
|
||||
werden.\n\
|
||||
/W Wartet vor dem Start, bis ein Datenträger\n\
|
||||
eingelegt wurde.\n\
|
||||
/U Ersetzt (aktualisiert) nur Dateien, die älter\n\
|
||||
sind als die Quelldaten. Kann nicht mit Parameter\n\
|
||||
/A genutzt werden.\n"
|
||||
STRING_REPLACE_HELP2 "Quellpfad benötigt\n"
|
||||
STRING_REPLACE_HELP3 "Keine Dateien ersetzt\n"
|
||||
STRING_REPLACE_HELP4 "%lu Datei(en) ersetzt\n"
|
||||
STRING_REPLACE_HELP5 "Ersetze %s\n"
|
||||
STRING_REPLACE_HELP6 "Ersetze %s\n"
|
||||
STRING_REPLACE_HELP7 "Keine Dateien hinzugefügt\n"
|
||||
STRING_REPLACE_HELP8 "%lu Datei(en) hinzugefügt\n"
|
||||
STRING_REPLACE_HELP9 "Füge %s hinzu (J/N)? "
|
||||
STRING_REPLACE_HELP10 "Ersetze %s (J/N)? "
|
||||
STRING_REPLACE_HELP11 "Füge %s hinzu\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Ungültiger Parameter - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Pfad wurde nicht gefunden - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Der Dateiname, Ordnername oder die Syntax der Volumenbezeichung sind inkorrekt.\n"
|
||||
STRING_REPLACE_ERROR4 "Ungültige Parameterkombination\n"
|
||||
STRING_REPLACE_ERROR5 "Zugriff verweigert - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Keine Dateien gefunden - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Erweiterter Fehler 32\n"
|
||||
|
||||
STRING_COPY_OPTION "JNA"
|
||||
STRING_COPY_ERROR1 "Fehler: Quelle kann nicht geöffnet werden - %s!\n"
|
||||
STRING_COPY_ERROR3 "Fehler: Schreibziel!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Drücken Sie eine beliebige Taste . . . "
|
||||
STRING_CONSOLE_ERROR "Unbekannter Fehler: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Fehler: Zu wenig Speicher verfügbar.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/el-GR.rc
Normal file
55
base/applications/cmdutils/replace/lang/el-GR.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Greek resource file
|
||||
* TRANSLATOR: Copyright 2008 Apostolos Alexiadis <djapal@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Replaces files.\n\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Specifies the source file or files.\n\
|
||||
[drive2:][path2] Specifies the directory where files are to be\n\
|
||||
replaced.\n\
|
||||
/A Adds new files to destination directory. Cannot\n\
|
||||
use with /S or /U switches.\n\
|
||||
/P Prompts for confirmation before replacing a file or\n\
|
||||
adding a source file.\n\
|
||||
/R Replaces read-only files as well as unprotected\n\
|
||||
files.\n\
|
||||
/S Replaces files in all subdirectories of the\n\
|
||||
destination directory. Cannot use with the /A\n\
|
||||
switch.\n\
|
||||
/W Waits for you to insert a disk before beginning.\n\
|
||||
/U Replaces (updates) only files that are older than\n\
|
||||
source files. Cannot use with the /A switch.\n"
|
||||
STRING_REPLACE_HELP2 "Απαιτείται το μονοπάτι-πηγή\n"
|
||||
STRING_REPLACE_HELP3 "Δεν έγινε αντικατάσταση αρχείων\n"
|
||||
STRING_REPLACE_HELP4 "%lu αρχείο(α) αντικαταστάθηκαν\n"
|
||||
STRING_REPLACE_HELP5 "Γίνεται αντικατάσταση του %s\n"
|
||||
STRING_REPLACE_HELP6 "Αντικατάσταση του %s\n"
|
||||
STRING_REPLACE_HELP7 "Δεν προστέθηκαν αρχεία\n"
|
||||
STRING_REPLACE_HELP8 "%lu αρχείο(α) προστέθηκαν\n"
|
||||
STRING_REPLACE_HELP9 "Προσθήκη %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Αντικατάσταση %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Γίνεται προσθήκη του %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Δε βρέθηκε το μονοπάτι - %s\n"
|
||||
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
|
||||
STRING_REPLACE_ERROR4 "Invalid parameter combination\n"
|
||||
STRING_REPLACE_ERROR5 "Δεν επιτρέπεται η πρόσβαση - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Δε βρέθηκαν αρχεία - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Extended Error 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "Σφάλμα: Δεν ήταν δυνατό το άνοιγμα της πηγής - %s!\n"
|
||||
STRING_COPY_ERROR3 "Σφάλμα: writing destination!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Πατήστε οποιοδήποτε πλήκτρο για συνέχεια . . . "
|
||||
STRING_CONSOLE_ERROR "Άγνωστο σφάλμα: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Out of memory error.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/en-US.rc
Normal file
55
base/applications/cmdutils/replace/lang/en-US.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: English (United States) resource file
|
||||
* TRANSLATOR: Copyright 2007 Samuel Erdtman <samuel@erdtman.se>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Replaces files.\n\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Specifies the source file or files.\n\
|
||||
[drive2:][path2] Specifies the directory where files are to be\n\
|
||||
replaced.\n\
|
||||
/A Adds new files to destination directory. Cannot\n\
|
||||
use with /S or /U switches.\n\
|
||||
/P Prompts for confirmation before replacing a file or\n\
|
||||
adding a source file.\n\
|
||||
/R Replaces read-only files as well as unprotected\n\
|
||||
files.\n\
|
||||
/S Replaces files in all subdirectories of the\n\
|
||||
destination directory. Cannot use with the /A\n\
|
||||
switch.\n\
|
||||
/W Waits for you to insert a disk before beginning.\n\
|
||||
/U Replaces (updates) only files that are older than\n\
|
||||
source files. Cannot use with the /A switch.\n"
|
||||
STRING_REPLACE_HELP2 "Source path required\n"
|
||||
STRING_REPLACE_HELP3 "No files replaced\n"
|
||||
STRING_REPLACE_HELP4 "%lu file(s) replaced\n"
|
||||
STRING_REPLACE_HELP5 "Replacing %s\n"
|
||||
STRING_REPLACE_HELP6 "Replace %s\n"
|
||||
STRING_REPLACE_HELP7 "No files added\n"
|
||||
STRING_REPLACE_HELP8 "%lu file(s) added\n"
|
||||
STRING_REPLACE_HELP9 "Add %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Replace %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Adding %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Path not found - %s\n"
|
||||
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
|
||||
STRING_REPLACE_ERROR4 "Invalid parameter combination\n"
|
||||
STRING_REPLACE_ERROR5 "Access denied - %s\n"
|
||||
STRING_REPLACE_ERROR6 "No files found - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Extended Error 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "Error: Cannot open source - %s!\n"
|
||||
STRING_COPY_ERROR3 "Error writing destination!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Press any key to continue . . . "
|
||||
STRING_CONSOLE_ERROR "Unknown error: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Out of memory error.\n"
|
||||
END
|
58
base/applications/cmdutils/replace/lang/es-ES.rc
Normal file
58
base/applications/cmdutils/replace/lang/es-ES.rc
Normal file
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Spanish (Spain) resource file
|
||||
* TRANSLATORS: Copyright 2005 Jose Pedro Fernández Pascual <huma2000@terra.es>
|
||||
* Copyright 2015 Ismael Ferreras Morezuelas <swyterzone+ros@gmail.com>
|
||||
* Copyright 2020 Catalin Gabriel Draghita <catalin.draghita@hotmail.es>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Reemplaza archivos.\n\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Especifica el archivo o archivos de origen.\n\
|
||||
[drive2:][path2] Especifica el nombre de la carpeta donde se\n\
|
||||
reemplacen los archivos.\n\
|
||||
/A Añade nuevos archivos al directorio destino. No\n\
|
||||
se puede usar con las opciones /S o /U.\n\
|
||||
/P Pregunta para confirmación antes de reemplazar un\n\
|
||||
archivo o añadir un archivo origen.\n\
|
||||
/R Reemplaza todos los archivos solo lectura y los\n\
|
||||
archivos no protegidos.\n\
|
||||
/S Reemplaza todos los archivos en todos los\n\
|
||||
subdirectorios\n\
|
||||
del directorio destino. No se puede usar con la opción /A.\n\
|
||||
/W Espera que insertes un disco antes de empezar.\n\
|
||||
/U Reemplaza (actualiza) solo los archivos que son más\n\
|
||||
antiguos que los de origen. No se puede usar con\n\
|
||||
la opción /A.\n"
|
||||
STRING_REPLACE_HELP2 "Ruta de origen requerida\n"
|
||||
STRING_REPLACE_HELP3 "No se han reemplazado archivos\n"
|
||||
STRING_REPLACE_HELP4 "Se han reemplazado %lu archivo(s)\n"
|
||||
STRING_REPLACE_HELP5 "Reemplazando %s\n"
|
||||
STRING_REPLACE_HELP6 "Reemplazar %s\n"
|
||||
STRING_REPLACE_HELP7 "No se han añadido archivos\n"
|
||||
STRING_REPLACE_HELP8 "%lu archivo(s) añadidos\n"
|
||||
STRING_REPLACE_HELP9 "Añadir %s (S/N)? "
|
||||
STRING_REPLACE_HELP10 "Reemplazar %s (S/N)? "
|
||||
STRING_REPLACE_HELP11 "Añadiendo %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Argumento no válido - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Ruta no encontrada - %s\n"
|
||||
STRING_REPLACE_ERROR3 "La sintaxis del nombre de archivo, carpeta o volúmen es incorrecta.\n"
|
||||
STRING_REPLACE_ERROR4 "Combinación de parámetros incorrecta\n"
|
||||
STRING_REPLACE_ERROR5 "Acceso denegado - %s\n"
|
||||
STRING_REPLACE_ERROR6 "No se han encontrado archivos - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Error extendido 32\n"
|
||||
|
||||
STRING_COPY_OPTION "SNT"
|
||||
STRING_COPY_ERROR1 "Error: No se puede abrir el origen - %s!\n"
|
||||
STRING_COPY_ERROR3 "¡Error escribiendo destino!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Pulse una tecla para continuar ... "
|
||||
STRING_CONSOLE_ERROR "Error desconocido: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Error fuera de memoria.\n"
|
||||
END
|
56
base/applications/cmdutils/replace/lang/fr-FR.rc
Normal file
56
base/applications/cmdutils/replace/lang/fr-FR.rc
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: French (France) resource file
|
||||
* TRANSLATORS: Copyright 2005 Sylvain Pétréolle <spetreolle@yahoo.fr>
|
||||
* Copyright 2007 Pierre Schweitzer <heis_spiter@hotmail.com>
|
||||
* Copyright 2018 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Remplace les fichiers.\n\n\
|
||||
REPLACE [lecteur1:][chemin1]nomdefichier [lecteur2:][chemin2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [lecteur1:][chemin1]nomdefichier [lecteur2:][chemin2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[lecteur1:][chemin1]nomdefichier Spécifie le ou les fichier(s) source.\n\
|
||||
[lecteur2:][chemin2] Spécifie le répertoire où les fichiers doivent être\n\
|
||||
remplacés.\n\
|
||||
/A Ajoute les nouveaux fichiers dans le répertoire de destination. Ne peut\n\
|
||||
être utilisé avec /S ou /U.\n\
|
||||
/P Demande une confirmation avant de remplacer un fichier ou\n\
|
||||
d'ajouter un fichier source.\n\
|
||||
/R Remplace les fichiers en lecture-seule aussi bien que les\n\
|
||||
fichiers sans protection.\n\
|
||||
/S Remplace les fichiers dans tous les sous-répertoires du\n\
|
||||
répertoire de destination. Ne peut être utilisé avec /A.\n\
|
||||
/W Attend que vous insériez un disque avant de commencer.\n\
|
||||
/U Remplace (met à jour) uniquement les fichiers qui sont plus anciens que\n\
|
||||
les fichiers sources. Ne peut être utilisé avec /A.\n"
|
||||
STRING_REPLACE_HELP2 "Chemin source requis\n"
|
||||
STRING_REPLACE_HELP3 "Aucun fichier remplacé\n"
|
||||
STRING_REPLACE_HELP4 "%lu fichier(s) remplacé(s)\n"
|
||||
STRING_REPLACE_HELP5 "Remplace %s\n"
|
||||
STRING_REPLACE_HELP6 "Remplace %s\n"
|
||||
STRING_REPLACE_HELP7 "Aucun fichier ajouté\n"
|
||||
STRING_REPLACE_HELP8 "%lu fichier(s) ajouté(s)\n"
|
||||
STRING_REPLACE_HELP9 "Ajouter %s (O/N) ? "
|
||||
STRING_REPLACE_HELP10 "Remplacer %s (O/N) ? "
|
||||
STRING_REPLACE_HELP11 "Ajoute %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Commutateur invalide - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Chemin introuvable - %s\n"
|
||||
STRING_REPLACE_ERROR3 "La syntaxe du nom de fichier, du répertoire, ou du nom de volume est incorrecte.\n"
|
||||
STRING_REPLACE_ERROR4 "Combinaison de paramètres invalide\n"
|
||||
STRING_REPLACE_ERROR5 "Accès refusé - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Aucun fichier trouvé - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Erreur étendue 32\n"
|
||||
|
||||
STRING_COPY_OPTION "ONT"
|
||||
STRING_COPY_ERROR1 "Erreur : Ne peut ouvrir la source - %s !\n"
|
||||
STRING_COPY_ERROR3 "Erreur à l'écriture de la destination !\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Appuyez sur une touche pour continuer . . . "
|
||||
STRING_CONSOLE_ERROR "Erreur inconnue : %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Pas assez de mémoire.\n"
|
||||
END
|
54
base/applications/cmdutils/replace/lang/hu-HU.rc
Normal file
54
base/applications/cmdutils/replace/lang/hu-HU.rc
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Hungarian resource file
|
||||
* TRANSLATORS: Copyright 2005 Robert Horvath <talley@cubeclub.hu>
|
||||
* Copyright 2020 Tibor Lajos Füzi <tibor.fuzi@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Fájlok cseréje.\n\n\
|
||||
REPLACE [meghajt1:][útvonal1]fájl [meghajt2:][útvonal2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [meghajt1:][útvonal1]fájl [meghajt2:][útvonal2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[meghajt1:][útvonal1]fájl A forrás fájl vagy fájlok.\n\
|
||||
[meghajt2:][útvonal2] A cél mappa, ahol a fájlok lecserélődnek.\n\
|
||||
/A Új fájlokat ad a cél mappába. Nem lehet\n\
|
||||
a /S vagy /U kapcsolókkal együtt használni.\n\
|
||||
/P Rákérdez fájlcsere vagy fájl hozzáadása előtt.\n\
|
||||
/R A csak olvasható fájlokat is ugyanúgy cseréli, mint\n\
|
||||
a védelem nélküli fájlokat.\n\
|
||||
/S Az célmappa összes almappájában cseréli a fájlokat.\n\
|
||||
Nem lehet a /A kapcsolóval együtt használni.\n\
|
||||
/W Lemez behelyezésére vár a kezdés előtt.\n\
|
||||
/U Csak azokat a fájlokat cseréli (frissíti), amik\n\
|
||||
régebbiek mint a forrás fájl.\n\
|
||||
Nem lehet a /A kapcsolóval együtt használni.\n"
|
||||
STRING_REPLACE_HELP2 "Meg kell adni a forrás útvonalat\n"
|
||||
STRING_REPLACE_HELP3 "Egy fájl sem lett cserélve\n"
|
||||
STRING_REPLACE_HELP4 "%lu fájl lett cserélve\n"
|
||||
STRING_REPLACE_HELP5 "Csere: %s\n"
|
||||
STRING_REPLACE_HELP6 "Csere: %s\n"
|
||||
STRING_REPLACE_HELP7 "Egy fájl sem lett hozzáadva\n"
|
||||
STRING_REPLACE_HELP8 "%lu fájl lett hozzáadva\n"
|
||||
STRING_REPLACE_HELP9 "Hozzáadja %s (I/N)? "
|
||||
STRING_REPLACE_HELP10 "Cseréli %s (I/N)? "
|
||||
STRING_REPLACE_HELP11 "Hozzáadás: %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Érvénytelen kapcsoló - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Útvonal nem található - %s\n"
|
||||
STRING_REPLACE_ERROR3 "A fájlnév, mappanév, vagy kötetcímke szintaxis hibás.\n"
|
||||
STRING_REPLACE_ERROR4 "Érvénytelen paraméter kombináció\n"
|
||||
STRING_REPLACE_ERROR5 "Hozzáférés megtagadva - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Nem találhatóak fájlok - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Kiterjesztett hiba 32\n"
|
||||
|
||||
STRING_COPY_OPTION "INM"
|
||||
STRING_COPY_ERROR1 "Hiba: a forrás nem nyitható meg - %s!\n"
|
||||
STRING_COPY_ERROR3 "Hiba a cél írása közben!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "A folytatáshoz nyomjon meg egy billentyűt . . . "
|
||||
STRING_CONSOLE_ERROR "Ismeretlen hiba: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Nincs elég memória.\n"
|
||||
END
|
56
base/applications/cmdutils/replace/lang/id-ID.rc
Normal file
56
base/applications/cmdutils/replace/lang/id-ID.rc
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Indonesian resource file
|
||||
* TRANSLATORS: Copyright 2007 Zaenal Mutaqin <ade999@gmail.com>
|
||||
* Copyright 2021 Reinhart Previano Koentjoro <reinhart_previano@yahoo.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Replaces files.\n\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Specifies the source file or files.\n\
|
||||
[drive2:][path2] Specifies the directory where files are to be\n\
|
||||
replaced.\n\
|
||||
/A Adds new files to destination directory. Cannot\n\
|
||||
use with /S or /U switches.\n\
|
||||
/P Prompts for confirmation before replacing a file or\n\
|
||||
adding a source file.\n\
|
||||
/R Replaces read-only files as well as unprotected\n\
|
||||
files.\n\
|
||||
/S Replaces files in all subdirectories of the\n\
|
||||
destination directory. Cannot use with the /A\n\
|
||||
switch.\n\
|
||||
/W Waits for you to insert a disk before beginning.\n\
|
||||
/U Replaces (updates) only files that are older than\n\
|
||||
source files. Cannot use with the /A switch.\n"
|
||||
STRING_REPLACE_HELP2 "Source path required\n"
|
||||
STRING_REPLACE_HELP3 "No files replaced\n"
|
||||
STRING_REPLACE_HELP4 "%lu file(s) replaced\n"
|
||||
STRING_REPLACE_HELP5 "Replacing %s\n"
|
||||
STRING_REPLACE_HELP6 "Replace %s\n"
|
||||
STRING_REPLACE_HELP7 "No files added\n"
|
||||
STRING_REPLACE_HELP8 "%lu file(s) added\n"
|
||||
STRING_REPLACE_HELP9 "Add %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Replace %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Adding %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Saklar perintah tidak valid - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Alamat file/direktori tidak ditemukan - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Sintaks nama file, direktori, atau label volume tidak benar.\n"
|
||||
STRING_REPLACE_ERROR4 "Kombinasi parameter tidak valid\n"
|
||||
STRING_REPLACE_ERROR5 "Akses ditolak - %s\n"
|
||||
STRING_REPLACE_ERROR6 "No files found - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Extended Error 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YTS"
|
||||
STRING_COPY_ERROR1 "Salah: Tidak dapat membuka sumber - %s!\n"
|
||||
STRING_COPY_ERROR3 "Kesalahan menulis tujuan!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Tekan tombol untuk melanjutkan . . . "
|
||||
STRING_CONSOLE_ERROR "Kesalahan tidak dikenal: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Kesalahan kekurangan memori.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/it-IT.rc
Normal file
55
base/applications/cmdutils/replace/lang/it-IT.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Italian resource file
|
||||
* TRANSLATOR: Copyright 2007-2008 Paolo Devoti <devotip@tiscali.it>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Sostituisce i file.\n\n\
|
||||
REPLACE [disco1:][percorso1]nomefile [disco2:][percorso2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [disco1:][percorso1]nomefile [disco2:][percorso2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]nomefile Specifica il o i file sorgenti.\n\
|
||||
[disco2:][percorso2] Specifica la cartella dove i file devono essere\n\
|
||||
sostituiti.\n\
|
||||
/A Aggiunge i file alla cartella di destinazione. Non può\n\
|
||||
essere usato con /S o /U .\n\
|
||||
/P Chiede conferma prima di sostituire o aggiungere\n\
|
||||
un file.\n\
|
||||
/R Sostituisce sia i file in sola lettura che quelli\n\
|
||||
non protetti.\n\
|
||||
/S Sostituisce i file in tutte le sottocartelle\n\
|
||||
della cartella di destinazione. Non può essere\n\
|
||||
usato con /A .\n\
|
||||
/W Aspetta che sia inserito un disco prima di iniziare.\n\
|
||||
/U Sostituisce (aggiorna) solo i file più vecchi\n\
|
||||
dei file sorgenti. Non può essere usato con /A .\n"
|
||||
STRING_REPLACE_HELP2 "Il percorso sorgente è obbligatorio\n"
|
||||
STRING_REPLACE_HELP3 "Nessun file sostituito\n"
|
||||
STRING_REPLACE_HELP4 "%lu file sostituiti\n"
|
||||
STRING_REPLACE_HELP5 "Sostituzione di %s in corso\n"
|
||||
STRING_REPLACE_HELP6 "Sostituzione di %s\n"
|
||||
STRING_REPLACE_HELP7 "Nessun file aggiunto\n"
|
||||
STRING_REPLACE_HELP8 "%lu file aggiunti\n"
|
||||
STRING_REPLACE_HELP9 "Aggiungere %s (S/N)? "
|
||||
STRING_REPLACE_HELP10 "Sostituire %s (S/N)? "
|
||||
STRING_REPLACE_HELP11 "Aggiunta di %s in corso\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Parametro non valido - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Percorso non trovato - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Il nome del file, della cartella o della etichetta di volume è errato.\n"
|
||||
STRING_REPLACE_ERROR4 "Combinazione di parametri non valida\n"
|
||||
STRING_REPLACE_ERROR5 "Accesso negato - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Nessun file trovato - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Errore esteso 32\n"
|
||||
|
||||
STRING_COPY_OPTION "SNT"
|
||||
STRING_COPY_ERROR1 "Errore: Impossibile aprire il file sorgente - %s!\n"
|
||||
STRING_COPY_ERROR3 "Errore durante la scrittura della destinazione!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Premi un tasto per continuare . . . "
|
||||
STRING_CONSOLE_ERROR "Errore sconosciuto: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Errore di memoria esaurita.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/ja-JP.rc
Normal file
55
base/applications/cmdutils/replace/lang/ja-JP.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Japanese resource file
|
||||
* TRANSLATOR: Copyright 2005 tsk <tsk_n@mail.goo.ne.jp>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Replaces files.\n\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Specifies the source file or files.\n\
|
||||
[drive2:][path2] Specifies the directory where files are to be\n\
|
||||
replaced.\n\
|
||||
/A Adds new files to destination directory. Cannot\n\
|
||||
use with /S or /U switches.\n\
|
||||
/P Prompts for confirmation before replacing a file or\n\
|
||||
adding a source file.\n\
|
||||
/R Replaces read-only files as well as unprotected\n\
|
||||
files.\n\
|
||||
/S Replaces files in all subdirectories of the\n\
|
||||
destination directory. Cannot use with the /A\n\
|
||||
switch.\n\
|
||||
/W Waits for you to insert a disk before beginning.\n\
|
||||
/U Replaces (updates) only files that are older than\n\
|
||||
source files. Cannot use with the /A switch.\n"
|
||||
STRING_REPLACE_HELP2 "Source path required\n"
|
||||
STRING_REPLACE_HELP3 "No files replaced\n"
|
||||
STRING_REPLACE_HELP4 "%lu file(s) replaced\n"
|
||||
STRING_REPLACE_HELP5 "Replacing %s\n"
|
||||
STRING_REPLACE_HELP6 "Replace %s\n"
|
||||
STRING_REPLACE_HELP7 "No files added\n"
|
||||
STRING_REPLACE_HELP8 "%lu file(s) added\n"
|
||||
STRING_REPLACE_HELP9 "Add %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Replace %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Adding %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Path not found - %s\n"
|
||||
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
|
||||
STRING_REPLACE_ERROR4 "Invalid parameter combination\n"
|
||||
STRING_REPLACE_ERROR5 "Access denied - %s\n"
|
||||
STRING_REPLACE_ERROR6 "No files found - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Extended Error 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "エラー: 元のファイル %s を開けません!\n"
|
||||
STRING_COPY_ERROR3 "指定先への書き込みでエラーが発生しました!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "続行するには何かキーを押してください . . . "
|
||||
STRING_CONSOLE_ERROR "不明なエラー: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "メモリ不足エラー。\n"
|
||||
END
|
56
base/applications/cmdutils/replace/lang/no-NO.rc
Normal file
56
base/applications/cmdutils/replace/lang/no-NO.rc
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Norwegian resource file
|
||||
* TRANSLATORS: Copyright 2007 Frode Lillerud (Scalpel78) <frode@enkelt.no>
|
||||
* Copyright 2009 Lars Martin Hambro (LMH1) <lars_martin4@hotmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Replaces files.\n\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Specifies the source file or files.\n\
|
||||
[drive2:][path2] Specifies the directory where files are to be\n\
|
||||
replaced.\n\
|
||||
/A Adds new files to destination directory. Cannot\n\
|
||||
use with /S or /U switches.\n\
|
||||
/P Prompts for confirmation before replacing a file or\n\
|
||||
adding a source file.\n\
|
||||
/R Replaces read-only files as well as unprotected\n\
|
||||
files.\n\
|
||||
/S Replaces files in all subdirectories of the\n\
|
||||
destination directory. Cannot use with the /A\n\
|
||||
switch.\n\
|
||||
/W Waits for you to insert a disk before beginning.\n\
|
||||
/U Replaces (updates) only files that are older than\n\
|
||||
source files. Cannot use with the /A switch.\n"
|
||||
STRING_REPLACE_HELP2 "Source path required\n"
|
||||
STRING_REPLACE_HELP3 "No files replaced\n"
|
||||
STRING_REPLACE_HELP4 "%lu file(s) replaced\n"
|
||||
STRING_REPLACE_HELP5 "Replacing %s\n"
|
||||
STRING_REPLACE_HELP6 "Replace %s\n"
|
||||
STRING_REPLACE_HELP7 "No files added\n"
|
||||
STRING_REPLACE_HELP8 "%lu file(s) added\n"
|
||||
STRING_REPLACE_HELP9 "Add %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Replace %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Adding %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Mappen ble ikke funnet - %s\n"
|
||||
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
|
||||
STRING_REPLACE_ERROR4 "Invalid parameter combination\n"
|
||||
STRING_REPLACE_ERROR5 "Tilgang nektet - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Ingen filer ble funnet - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Extended Error 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "Feil: kan ikke åpne kilden - %s!\n"
|
||||
STRING_COPY_ERROR3 "Feil ved skriving til destinasjon!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Trykk en tast for å fortsette . . . "
|
||||
STRING_CONSOLE_ERROR "Ukjent feil: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Feil: Minne fullt.\n"
|
||||
END
|
54
base/applications/cmdutils/replace/lang/pl-PL.rc
Normal file
54
base/applications/cmdutils/replace/lang/pl-PL.rc
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Polish resource file
|
||||
* TRANSLATOR: Copyright 2007-2011 Olaf Siejka <caemyr@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Zamienia pliki.\n\n\
|
||||
REPLACE [napęd1:][ścieżka1] pliki [napęd2:][ścieżka2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [napęd1:][ścieżka1] pliki [napęd2:][ścieżka2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[napęd1:][ścieżka1]nazwa_pliku Wyznacza źródło pliku bądź plików.\n\
|
||||
[napęd2:][ścieżka2] Wyznacza lokalizacje gdzie pliki mają być\n\
|
||||
zamienione.\n\
|
||||
/A Dodaje nowe pliki do lokalizacji docelowej. Nie można\n\
|
||||
łączyć z opcjami /S lub /U.\n\
|
||||
/P Żąda potwierdzenia przed zamianą istniejącego lub\n\
|
||||
dodaniem nowego pliku.\n\
|
||||
/R Zamienia pliki tylko do odczytu na równi z niezabez-\n\
|
||||
pieczonymi.\n\
|
||||
/S Zamienia pliki we wszystkich podkatalogach w lokazlizacji\n\
|
||||
docelowej. Nie można łączyć z opcją /A.\n\
|
||||
/W Czeka na włożenie dyskietki przed rozpoczęciem zamiany.\n\
|
||||
/U Zamienia (aktualizuje) wyłącznie pliki starsze od\n\
|
||||
źródłowych. Nie można łączyć z opcją /A.\n"
|
||||
STRING_REPLACE_HELP2 "Brak ścieżki do źródła\n"
|
||||
STRING_REPLACE_HELP3 "Nie zamieniono żadnego pliku\n"
|
||||
STRING_REPLACE_HELP4 "Zamieniono %lu plik(i/ów)\n"
|
||||
STRING_REPLACE_HELP5 "Zamiana %s\n"
|
||||
STRING_REPLACE_HELP6 "Zamieniony %s\n"
|
||||
STRING_REPLACE_HELP7 "Nie dodano nowych plików\n"
|
||||
STRING_REPLACE_HELP8 "Dodano %lu plik(i/ów)\n"
|
||||
STRING_REPLACE_HELP9 "Czy dodać %s (T/N)? "
|
||||
STRING_REPLACE_HELP10 "Czy zamienić %s (T/N)? "
|
||||
STRING_REPLACE_HELP11 "Dodawanie %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Nieprawidłowy parametr - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Ścieżka nie została odnaleziona - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Nazwa pliku, katalogu lub napędu nie jest prawidłowa.\n"
|
||||
STRING_REPLACE_ERROR4 "Nieprawidłowa kombinacja parametrów\n"
|
||||
STRING_REPLACE_ERROR5 "Dostęp zabroniony - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Nie znaleziono plików - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Extended Error 32 - Błąd współdzielenia\n"
|
||||
|
||||
STRING_COPY_OPTION "TNZ"
|
||||
STRING_COPY_ERROR1 "Błąd: Nie można otworzyć źródła - %s!\n"
|
||||
STRING_COPY_ERROR3 "Błąd zapisu na miejscu docelowym!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Naciśnij dowolny klawisz, aby kontynuować . . . "
|
||||
STRING_CONSOLE_ERROR "Nieznany błąd: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Błąd - brak pamięci.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/pt-BR.rc
Normal file
55
base/applications/cmdutils/replace/lang/pt-BR.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Portuguese (Brazilian) resource file
|
||||
* TRANSLATOR: Copyright 2022 Fernando Isnaldo Silva de Faria <fernando-i@outlook.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Substitui arquivos.\n\n\
|
||||
REPLACE [unidade1:][caminho1]arquivo [unidade2:][caminho2][/A][/P][/R][/W]\n\
|
||||
REPLACE [unidade1:][caminho1]arquivo [unidade2:][caminho2][/P][/R][/S][/W][/U]\n\n\
|
||||
[unidade1:] [caminho1] arquivo\n\
|
||||
Especifica o arquivo ou arquivos de origem.\n\
|
||||
[unidade2:] [caminho2]\n\
|
||||
Especifica o diretório onde os arquivos devem ser\n\
|
||||
substituídos.\n\
|
||||
/A Adiciona novos arquivos ao diretório de destino.\n\
|
||||
Não pode usar com as opções /S ou /U.\n\
|
||||
/P Solicita confirmação antes de substituir ou adicionar\n\
|
||||
um arquivo.\n\
|
||||
/R Substitui arquivos só de leitura e arquivos desprotegidos\n\
|
||||
/S Substitui os arquivos em todos os subdiretórios do\n\
|
||||
diretório de destino. Não é possível usar com a opção /A.\n\
|
||||
/W Espera que insira um disco antes de começar.\n\
|
||||
/U Substitui (atualiza) apenas os arquivos mais antigos que os\n\
|
||||
arquivos fonte. Não é possível usar com a opção /A.\n"
|
||||
STRING_REPLACE_HELP2 "Caminho de origem obrigatório\n"
|
||||
STRING_REPLACE_HELP3 "Nenhum arquivo substituído\n"
|
||||
STRING_REPLACE_HELP4 "%lu arquivo(s) substituído(s)\n"
|
||||
STRING_REPLACE_HELP5 "A substituir %s\n"
|
||||
STRING_REPLACE_HELP6 "Substitua %s\n"
|
||||
STRING_REPLACE_HELP7 "Nenhum arquivo adicionado\n"
|
||||
STRING_REPLACE_HELP8 "%lu arquivo(s) adicionado(s)\n"
|
||||
STRING_REPLACE_HELP9 "Adicionar %s (S/N)?"
|
||||
STRING_REPLACE_HELP10 "Substituir %s (S/N)?"
|
||||
STRING_REPLACE_HELP11 "A adicionar %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Opção inválida - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Caminho não encontrado - %s\n"
|
||||
STRING_REPLACE_ERROR3 "O nome do arquivo, nome do diretório ou sintaxe do rótulo do volume está incorreto.\n"
|
||||
STRING_REPLACE_ERROR4 "Combinação de parâmetro inválida\n"
|
||||
STRING_REPLACE_ERROR5 "Acesso negado - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Nenhum arquivo encontrado - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Erro estendido 32\n"
|
||||
|
||||
STRING_COPY_OPTION "SNT"
|
||||
STRING_COPY_ERROR1 "Erro: Não é possível abrir o código - %s!\n"
|
||||
STRING_COPY_ERROR3 "Erro ao escrever destino!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Pressione qualquer tecla para continuar..."
|
||||
STRING_CONSOLE_ERROR "Erro desconhecido: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Erro de falta de memória.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/pt-PT.rc
Normal file
55
base/applications/cmdutils/replace/lang/pt-PT.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Portuguese (Portugal) resource file
|
||||
* TRANSLATOR: Copyright 2020 Jose Carlos Jesus <zecarlos1957@hotmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Substitui ficheiros.\n\n\
|
||||
REPLACE [unidade1:][caminho1]ficheiro [unidade2:][caminho2][/A][/P][/R][/W]\n\
|
||||
REPLACE [unidade1:][caminho1]ficheiro [unidade2:][caminho2][/P][/R][/S][/W][/U]\n\n\
|
||||
[unidade1:] [caminho1] ficheiro\n\
|
||||
Especifica o ficheiro ou ficheiros de origem.\n\
|
||||
[unidade2:] [caminho2]\n\
|
||||
Especifica o directório onde os ficheiros devem ser\n\
|
||||
substituídos.\n\
|
||||
/A Adiciona novos ficheiros ao directório de destino.\n\
|
||||
Não pode usar com as opções /S ou /U.\n\
|
||||
/P Solicita confirmação antes de substituir ou adicionar\n\
|
||||
um ficheiro.\n\
|
||||
/R Substitui ficheiros só de leitura e ficheiros desprotegidos\n\
|
||||
/S Substitui os ficheiros em todos os subdiretórios do\n\
|
||||
directório de destino. Não é possível usar com a opção /A.\n\
|
||||
/W Espera que insira um disco antes de começar.\n\
|
||||
/U Substitui (atualiza) apenas os ficheiros mais antigos que os\n\
|
||||
arquivos fonte. Não é possível usar com a opção /A.\n"
|
||||
STRING_REPLACE_HELP2 "Caminho de origem obrigatório\n"
|
||||
STRING_REPLACE_HELP3 "Nenhum ficheiro substituído\n"
|
||||
STRING_REPLACE_HELP4 "%lu ficheiro(s) substituído(s)\n"
|
||||
STRING_REPLACE_HELP5 "A substituir %s\n"
|
||||
STRING_REPLACE_HELP6 "Substitua %s\n"
|
||||
STRING_REPLACE_HELP7 "Nenhum ficheiro adicionado\n"
|
||||
STRING_REPLACE_HELP8 "%lu ficheiro(s) adicionado(s)\n"
|
||||
STRING_REPLACE_HELP9 "Adicionar %s (S/N)?"
|
||||
STRING_REPLACE_HELP10 "Substituir %s (S/N)?"
|
||||
STRING_REPLACE_HELP11 "A adicionar %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Opção inválida - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Caminho não encontrado - %s\n"
|
||||
STRING_REPLACE_ERROR3 "O nome do ficheiro, nome do directório ou sintaxe do rótulo do volume está incorrecto.\n"
|
||||
STRING_REPLACE_ERROR4 "Combinação de parâmetro inválida\n"
|
||||
STRING_REPLACE_ERROR5 "Acesso negado - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Nenhum ficheiro encontrado - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Erro estendido 32\n"
|
||||
|
||||
STRING_COPY_OPTION "SNT"
|
||||
STRING_COPY_ERROR1 "Erro: Não é possível abrir o código - %s!\n"
|
||||
STRING_COPY_ERROR3 "Erro ao escrever destino!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Pressione qualquer tecla para continuar..."
|
||||
STRING_CONSOLE_ERROR "Erro desconhecido: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Erro de falta de memória.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/ro-RO.rc
Normal file
55
base/applications/cmdutils/replace/lang/ro-RO.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Romanian resource file
|
||||
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
|
||||
* Copyright 2023-2024 Andrei Miloiu <miloiuandrei@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Înlocuiește fișiere.\n\n\
|
||||
REPLACE [disc1:][cale1]fișier [disc2:][cale2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [disc1:][cale1]fișier [disc2:][cale2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[disc1:][cale1]fișier Specifică fișierul sau fișierele sursă.\n\
|
||||
[disc2:][cale2] Specifică directorul unde vor fi înlocuite fișiere.\n\
|
||||
/A Adaugă fișiere noi în directorul destinație. Nu se\n\
|
||||
poate folosi cu argumentele /S sau /U.\n\
|
||||
/P Cere confirmare înaintea înlocuirii unui fișier sau\n\
|
||||
a adăugării unui fișier sursă.\n\
|
||||
/R Înlocuiește atât fișierele modificabile, cât și\n\
|
||||
fișierele nemodificabile.\n\
|
||||
/S Înlocuiește fișierele în toate subdirectoarele\n\
|
||||
directorului destinație. Nu se poate folosi\n\
|
||||
cu argumentul /A.\n\
|
||||
/W Așteaptă inserția unui disc înainte de a începe.\n\
|
||||
/U Înlocuiește (actualizează) doar fișierele mai vechi\n\
|
||||
decât fișierele sursă. Nu se poate folosi cu /A.\n"
|
||||
STRING_REPLACE_HELP2 "Este necesară calea sursă\n"
|
||||
STRING_REPLACE_HELP3 "Nu a fost înlocuit nici un fișier\n"
|
||||
STRING_REPLACE_HELP4 "A(u) fost înlocuit(e) %lu fișier(e)\n"
|
||||
STRING_REPLACE_HELP5 "Înlocuire «%s»\n"
|
||||
STRING_REPLACE_HELP6 "Înlocuiește «%s»\n"
|
||||
STRING_REPLACE_HELP7 "Nu au fost adăugate fișiere\n"
|
||||
STRING_REPLACE_HELP8 "A(u) fost adăugat(e) %lu fișier(e)\n"
|
||||
STRING_REPLACE_HELP9 "Adaugă «%s» (Da/Nu)? "
|
||||
|
||||
STRING_REPLACE_HELP10 "Înlocuiește «%s» (Da/Nu)? "
|
||||
STRING_REPLACE_HELP11 "Adăugare «%s»\n"
|
||||
STRING_REPLACE_ERROR1 "Argument eronat - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Calea nu este găsită - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Numele fișierului, directorului sau eticheta volumului este incorectă.\n"
|
||||
STRING_REPLACE_ERROR4 "Combinația de argumente nu este validă!\n"
|
||||
STRING_REPLACE_ERROR5 "Acces respins - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Fișierele nu au fost găsite - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Eroare extinsă 32\n"
|
||||
|
||||
STRING_COPY_OPTION "DNT"
|
||||
STRING_COPY_ERROR1 "Eroare: Nu se poate deschide sursa - %s!\n"
|
||||
STRING_COPY_ERROR3 "Eroare de scriere în destinație!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Tastați pentru a continua... "
|
||||
STRING_CONSOLE_ERROR "Eroare necunoscută: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Eroare de exces de memorie.\n"
|
||||
END
|
57
base/applications/cmdutils/replace/lang/ru-RU.rc
Normal file
57
base/applications/cmdutils/replace/lang/ru-RU.rc
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Russian resource file
|
||||
* TRANSLATORS: Copyright 2005 Aleksey Bragin <aleksey@reactos.org>
|
||||
* Copyright 2007 Dmitry Chapyshev <dmitry@reactos.org>
|
||||
* Copyright 2014-2015 Kudratov Olimjon <olim98@bk.ru>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Замена файлов.\n\n\
|
||||
REPLACE [диск1:][путь1]имя_файла [диск2:][путь2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [диск1:][путь1]имя_файла [диск2:][путь2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[диск1:][путь1]имя_файла Один или несколько исходных файлов.\n\
|
||||
[диск2:][путь2] Каталог, в котором следует заменить\n\
|
||||
файлы.\n\
|
||||
/A Добавление новых файлов в конечный каталог.\n\
|
||||
Этот ключ несовместим с ключами /S и /U.\n\
|
||||
/P Вывод запроса перед заменой или\n\
|
||||
добавлением файла.\n\
|
||||
/R Разрешение замены файлов, предназначенных\n\
|
||||
только для чтения (среди прочих).\n\
|
||||
/S Замена файлов во всех подкаталогах\n\
|
||||
конечного каталога.\n\
|
||||
Этот ключ несовместим с ключом /A.\n\
|
||||
/W Ожидание вставки диска перед началом выполнения.\n\
|
||||
/U Замена только файлов, более старых, чем исходные.\n\
|
||||
Этот ключ несовместим с ключом /A.\n"
|
||||
STRING_REPLACE_HELP2 "Необходимо указать путь к исходным файлам\n"
|
||||
STRING_REPLACE_HELP3 "Ни один файл не заменен\n"
|
||||
STRING_REPLACE_HELP4 "%lu файл(ов) заменено\n"
|
||||
STRING_REPLACE_HELP5 "Замена %s\n"
|
||||
STRING_REPLACE_HELP6 "Замена %s\n"
|
||||
STRING_REPLACE_HELP7 "Нет новых файлов\n"
|
||||
STRING_REPLACE_HELP8 "%lu файл(ов) добавлено\n"
|
||||
STRING_REPLACE_HELP9 "Добавить %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Заменить %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Добавление %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Неверный ключ - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Путь не найден - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Имя файла, папки или метка диска неверная.\n"
|
||||
STRING_REPLACE_ERROR4 "Неверная комбинация параметров\n"
|
||||
STRING_REPLACE_ERROR5 "Доступ запрещён - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Не найдено файлов - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Расширенная ошибка 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "Ошибка: Невозможно открыть источник - %s!\n"
|
||||
STRING_COPY_ERROR3 "Ошибка записи!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Для продолжения нажмите любую клавишу . . . "
|
||||
STRING_CONSOLE_ERROR "Неизвестная ошибка: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Нехватка памяти.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/sk-SK.rc
Normal file
55
base/applications/cmdutils/replace/lang/sk-SK.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Slovak resource file
|
||||
* TRANSLATOR: Copyright 2009-2010 Mário Kačmár <kario@szm.sk>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Replaces files.\n\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Specifies the source file or files.\n\
|
||||
[drive2:][path2] Specifies the directory where files are to be\n\
|
||||
replaced.\n\
|
||||
/A Adds new files to destination directory. Cannot\n\
|
||||
use with /S or /U switches.\n\
|
||||
/P Prompts for confirmation before replacing a file or\n\
|
||||
adding a source file.\n\
|
||||
/R Replaces read-only files as well as unprotected\n\
|
||||
files.\n\
|
||||
/S Replaces files in all subdirectories of the\n\
|
||||
destination directory. Cannot use with the /A\n\
|
||||
switch.\n\
|
||||
/W Waits for you to insert a disk before beginning.\n\
|
||||
/U Replaces (updates) only files that are older than\n\
|
||||
source files. Cannot use with the /A switch.\n"
|
||||
STRING_REPLACE_HELP2 "Source path required\n"
|
||||
STRING_REPLACE_HELP3 "No files replaced\n"
|
||||
STRING_REPLACE_HELP4 "%lu file(s) replaced\n"
|
||||
STRING_REPLACE_HELP5 "Replacing %s\n"
|
||||
STRING_REPLACE_HELP6 "Replace %s\n"
|
||||
STRING_REPLACE_HELP7 "No files added\n"
|
||||
STRING_REPLACE_HELP8 "%lu file(s) added\n"
|
||||
STRING_REPLACE_HELP9 "Add %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Replace %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Adding %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Neplatný prepínač - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Cesta sa nenašla - %s\n"
|
||||
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
|
||||
STRING_REPLACE_ERROR4 "Invalid parameter combination\n"
|
||||
STRING_REPLACE_ERROR5 "Prístup zamietnutý - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Žiadne súbory sa nenašli - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Extended Error 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "Chyba: Cannot open source - %s!\n"
|
||||
STRING_COPY_ERROR3 "Error writing destination!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Pokračujte stlačením ľubovoľného klávesu ... "
|
||||
STRING_CONSOLE_ERROR "Neznáma chyba: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Chyba (z) nedostatku pamäte.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/sq-AL.rc
Normal file
55
base/applications/cmdutils/replace/lang/sq-AL.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Albanian resource file
|
||||
* TRANSLATOR: Copyright 2013 Ardit Dani (Ard1t) <ardit.dani@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "zëvendëson dokumentat.\n\n\
|
||||
REPLACE [drive1:][rrugë1]emri [drive2:][rrugë2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][rrugë1]emri [drive2:][rrugë2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][rrugë1]emri Specifikon e dokumentit ose dokumentëve.\n\
|
||||
[drive2:][rrugë2] Specifikon directorine ku dokumentet do të\n\
|
||||
zëvendësohen.\n\
|
||||
/A Shton dokumente të reja tek directoria e destinacionit. Nuk\n\
|
||||
përdoret me /S ose /U.\n\
|
||||
/P Shfaw konfirmimim para se të zëvendësosh një dokument apo\n\
|
||||
shtimit të burimit të dokumentit.\n\
|
||||
/R Zëvendëso dokumentat vetëm-lexohet, si dhe dokumentet e\n\
|
||||
pambrojtur.\n\
|
||||
/S Zëvendëson dokumentet në të gjitha nën-direktoritë e\n\
|
||||
directorite. Nuk mund të përdorë me/A\n\
|
||||
parametra.\n\
|
||||
/W Pret për ju për të futur një disk para fillimit të.\n\
|
||||
/U Zëvendëso (update) vetem dokumenta që janë më të vjetër se\n\
|
||||
dokumentat e burimit. Nuk mund ta përdorësh me /A.\n"
|
||||
STRING_REPLACE_HELP2 "Rruga e Burimi kërkohet\n"
|
||||
STRING_REPLACE_HELP3 "Nuk zëvendësohen dokumentat\n"
|
||||
STRING_REPLACE_HELP4 "%lu dokumenta(t) zëvendësohen\n"
|
||||
STRING_REPLACE_HELP5 "Zëvendësohen %s\n"
|
||||
STRING_REPLACE_HELP6 "Zëvendësoh %s\n"
|
||||
STRING_REPLACE_HELP7 "S'ka dokumentat te shtuar\n"
|
||||
STRING_REPLACE_HELP8 "%lu dokumenta(t) u shtuan\n"
|
||||
STRING_REPLACE_HELP9 "Shto %s (P/J)? "
|
||||
STRING_REPLACE_HELP10 "Zëvendëso %s (P/J)? "
|
||||
STRING_REPLACE_HELP11 "Shtim %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Qeles invalid - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Rruga nuk u gjet - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Dokumenti, emri i direktorise, ose syntaksi i etiketes volumetrike eshte gabim.\n"
|
||||
STRING_REPLACE_ERROR4 "Kombimi i parametrave invalid\n"
|
||||
STRING_REPLACE_ERROR5 "Refuzot hyrja - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Nuk u gjet dokumenti - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Error i zgjatur 32\n"
|
||||
|
||||
STRING_COPY_OPTION "PJT"
|
||||
STRING_COPY_ERROR1 "Error: Nuk mund të hapni burim - %s!\n"
|
||||
STRING_COPY_ERROR3 "Gabim gjatë shkrimit në destinacion!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Shtypni një buton për të vazhduar . . . "
|
||||
STRING_CONSOLE_ERROR "Error i paditur: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Error ska memorie te mjaftueshme.\n"
|
||||
END
|
56
base/applications/cmdutils/replace/lang/sv-SE.rc
Normal file
56
base/applications/cmdutils/replace/lang/sv-SE.rc
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Swedish resource file
|
||||
* TRANSLATORS: Copyright 2011 Jan Blomqvist Kinander (Jaix Bly) <jaixbly@spray.se>
|
||||
* Copyright 2017 Markus Gothe <nietzsche@lysator.liu.se>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Ersätter filer.\n\n\
|
||||
REPLACE [drive1:][path1]filnamn [drive2:][path2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [drive1:][path1]filnamn [drive2:][path2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][path1]filename Specifies the source file or files.\n\
|
||||
[drive2:][path2] Specifies the directory where files are to be\n\
|
||||
replaced.\n\
|
||||
/A Adds new files to destination directory. Cannot\n\
|
||||
use with /S or /U switches.\n\
|
||||
/P Prompts for confirmation before replacing a file or\n\
|
||||
adding a source file.\n\
|
||||
/R Replaces read-only files as well as unprotected\n\
|
||||
files.\n\
|
||||
/S Replaces files in all subdirectories of the\n\
|
||||
destination directory. Cannot use with the /A\n\
|
||||
switch.\n\
|
||||
/W Waits for you to insert a disk before beginning.\n\
|
||||
/U Replaces (updates) only files that are older than\n\
|
||||
source files. Cannot use with the /A switch.\n"
|
||||
STRING_REPLACE_HELP2 "Source path required\n"
|
||||
STRING_REPLACE_HELP3 "No files replaced\n"
|
||||
STRING_REPLACE_HELP4 "%lu file(s) replaced\n"
|
||||
STRING_REPLACE_HELP5 "Replacing %s\n"
|
||||
STRING_REPLACE_HELP6 "Replace %s\n"
|
||||
STRING_REPLACE_HELP7 "No files added\n"
|
||||
STRING_REPLACE_HELP8 "%lu file(s) added\n"
|
||||
STRING_REPLACE_HELP9 "Add %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Replace %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Adding %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Felaktig växel - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Mappen ble inte funnet - %s\n"
|
||||
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
|
||||
STRING_REPLACE_ERROR4 "Invalid parameter combination\n"
|
||||
STRING_REPLACE_ERROR5 "Tillgång nekas - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Ingna filer hittades - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Extended Error 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "Fel: kan inte öppna källan - %s!\n"
|
||||
STRING_COPY_ERROR3 "Fel vid skriving till destinationen!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Tryck på valfri tangent för att fortsätta . . . "
|
||||
STRING_CONSOLE_ERROR "Okänt fel: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Fel: Minnet fullt.\n"
|
||||
END
|
53
base/applications/cmdutils/replace/lang/tr-TR.rc
Normal file
53
base/applications/cmdutils/replace/lang/tr-TR.rc
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Turkish resource file
|
||||
* TRANSLATORS: Copyright 2015 Erdem Ersoy (eersoy93) <erdemersoy@erdemersoy.net>
|
||||
* Copyright 2021 Süleyman Poyraz <zaryob.dev@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Replaces files.\n\n\
|
||||
REPLACE [sürücü1:][yol1]filename [sürücü2:][yol2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [sürücü1:][yol1]filename [sürücü2:][yol2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[drive1:][yol1]dosya adı Kaynak dosyayı veya dosyaları belirtir.\n\
|
||||
[drive2:][yol2] Dosyaların aktarılacağı dizini belirtir.\n\
|
||||
/A Hedef dizine yeni dosyalar ekler. /S veya /U\n\
|
||||
anahtarlarıyla kullanılamaz.\n\
|
||||
/P Bir dosyayı değiştirmeden veya bir kaynak dosya eklemeden\n\
|
||||
önce onay ister.\n\
|
||||
/R Salt okunur dosyaları da normal dosyalar gibi değiştirir\n\
|
||||
/S Hedef dizinin tüm alt dizinlerindeki dosyaları değiştirir.\n\
|
||||
/A anahtarıyla kullanılamaz.\n\
|
||||
/W Başlamadan önce bir disk yerleştirmenizi bekler.\n\
|
||||
/U Yalnızca kaynak dosyalardan daha eski dosyaları\n\
|
||||
değiştirir (günceller). /A anahtarıyla kullanılamaz.\n"
|
||||
STRING_REPLACE_HELP2 "Kaynak konum gerekli\n"
|
||||
STRING_REPLACE_HELP3 "Herhangi bir dosya değiştirilmedi\n"
|
||||
STRING_REPLACE_HELP4 "%lu dosya değiştirildi\n"
|
||||
STRING_REPLACE_HELP5 "Değiştiriliyor: %s\n"
|
||||
STRING_REPLACE_HELP6 "Değiştir: %s\n"
|
||||
STRING_REPLACE_HELP7 "Herhangi bir dosya eklenemedi\n"
|
||||
STRING_REPLACE_HELP8 "%lu dosya(lar) eklendi\n"
|
||||
STRING_REPLACE_HELP9 "Şunu ekle %s (E/H)? "
|
||||
STRING_REPLACE_HELP10 "Şunu değiştir %s (E/H)? "
|
||||
STRING_REPLACE_HELP11 "Ekleniyor: %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Geçersiz anahtar - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Yol bulunamadı - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Dosya adı, dizin adı veya birim etiketi sözdizimi yanlış.\n"
|
||||
STRING_REPLACE_ERROR4 "Hatalı parametre kombinasyonu\n"
|
||||
STRING_REPLACE_ERROR5 "Erişim reddedildi - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Hiçbir dosya bulunamadı - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Genişletilmiş Hata 32\n"
|
||||
|
||||
STRING_COPY_OPTION "EHT"
|
||||
STRING_COPY_ERROR1 "Hata: Kaynak açılamadı - %s!\n"
|
||||
STRING_COPY_ERROR3 "Hata: Hedefe yazılırken hata oluştu!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Devam etmek için herhangi bir tuşa basın . . . "
|
||||
STRING_CONSOLE_ERROR "Bilinmeyen Hata: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Yetersiz bellek.\n"
|
||||
END
|
55
base/applications/cmdutils/replace/lang/uk-UA.rc
Normal file
55
base/applications/cmdutils/replace/lang/uk-UA.rc
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Ukrainian resource file
|
||||
* TRANSLATORS: Copyright 2007 Artem Reznikov <temarez@yandex.ru>
|
||||
* Copyright 2011 Igor Paliychuk <mansonigor@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "Замiна файлiв.\n\n\
|
||||
REPLACE [диск1:][шлях1]iм'я_файлу [диск2:][шлях2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [диск1:][шлях1]iм'я_файлу [диск2:][шлях2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[диск1:][шлях1]iм'я_файлу Задає файл(и) для замiни.\n\
|
||||
[диск2:][шлях2] Задає каталог, в якому будуть замiненi файли\n\
|
||||
файли.\n\
|
||||
/A Додати новi файли в кiнцеву теку. Неможливе\n\
|
||||
при використаннi ключiв /S чи /U.\n\
|
||||
/P Запит на пiдтвердження замiни файлу чи\n\
|
||||
додавання початкового файлу.\n\
|
||||
/R Замiнює також файли лише для читання.\n\
|
||||
/S Замiнює файли у всiх пiдкаталогах каталогу\n\
|
||||
призначення. Неможливе при використаннi\n\
|
||||
ключа /A.\n\
|
||||
/W Чекає поки ви вставите диск перед початком.\n\
|
||||
/U Замiнює (оновлює) лише файли, що старiшi нiж\n\
|
||||
копiйованi. Неможливе при використаннi ключа /A.\n"
|
||||
STRING_REPLACE_HELP2 "Необхiдний шлях джерела\n"
|
||||
STRING_REPLACE_HELP3 "Не замiнено жодних файлiв\n"
|
||||
STRING_REPLACE_HELP4 "%lu файл(iв) замiнено\n"
|
||||
STRING_REPLACE_HELP5 "Замiна %s\n"
|
||||
STRING_REPLACE_HELP6 "Замiнити %s\n"
|
||||
STRING_REPLACE_HELP7 "Не додано жодних файлiв\n"
|
||||
STRING_REPLACE_HELP8 "%lu файл(iв) додано\n"
|
||||
STRING_REPLACE_HELP9 "Додати %s (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "Замiнити %s (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "Додавання %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "Невiрний ключ - %s\n"
|
||||
STRING_REPLACE_ERROR2 "Шлях не знайдено - %s\n"
|
||||
STRING_REPLACE_ERROR3 "Синтаксис iменi файлу, теки чи мiтки диску некоректнi.\n"
|
||||
STRING_REPLACE_ERROR4 "Невiрна комбiнацiя параметрiв\n"
|
||||
STRING_REPLACE_ERROR5 "Немає доступу - %s\n"
|
||||
STRING_REPLACE_ERROR6 "Файли не знайдено - %s\n"
|
||||
STRING_REPLACE_ERROR7 "Розширена помилка 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "Помилка: Неможливо вiдкрити джерело - %s!\n"
|
||||
STRING_COPY_ERROR3 "Помилка запису призначення!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "Натиснiть будь-яку клавiшу для продовження . . . "
|
||||
STRING_CONSOLE_ERROR "Невiдома помилка: %d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "Недостатньо пам'ятi.\n"
|
||||
END
|
49
base/applications/cmdutils/replace/lang/zh-CN.rc
Normal file
49
base/applications/cmdutils/replace/lang/zh-CN.rc
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Chinese (Simplified) resource file
|
||||
* TRANSLATORS: Copyright 2011 Song Fuchang (0xfc) <sfc_0@yahoo.com.cn>
|
||||
* Copyright 2021 Wu Haotian <rigoligo03@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "替换文件。\n\n\
|
||||
REPLACE [驱动器1:][路径1]文件名 [驱动器2:][路径2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [驱动器1:][路径1]文件名 [驱动器2:][路径2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[驱动器1:][路径1]文件名 指定一个或多个源文件。\n\
|
||||
[驱动器2:][路径2] 指定要被替换文件所在的目录。\n\
|
||||
/A 将新文件添加到目标目录。不能和 /S 或 /U 同时使用。\n\
|
||||
/P 在替换一个文件或添加一个源文件之前请求确认。\n\
|
||||
/R 将只读文件视为未保护文件并替换。\n\
|
||||
/S 替换目标目录中所有子目录中的文件。不能与 /A 同时使用。\n\
|
||||
/W 在开始前等待您插入一张磁盘。\n\
|
||||
/U 仅替换(更新)比原文件老的文件。不能和 /A 同时使用。\n"
|
||||
STRING_REPLACE_HELP2 "需要源路径\n"
|
||||
STRING_REPLACE_HELP3 "没有文件被替换\n"
|
||||
STRING_REPLACE_HELP4 "%lu 个文件已被替换\n"
|
||||
STRING_REPLACE_HELP5 "正在替换 %s\n"
|
||||
STRING_REPLACE_HELP6 "替换 %s\n"
|
||||
STRING_REPLACE_HELP7 "没有文件被添加\n"
|
||||
STRING_REPLACE_HELP8 "%lu 个文件已被添加\n"
|
||||
STRING_REPLACE_HELP9 "添加 %s 吗 (Y/N)? "
|
||||
STRING_REPLACE_HELP10 "替换 %s 吗 (Y/N)? "
|
||||
STRING_REPLACE_HELP11 "正在添加 %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "无效开关 - %s\n"
|
||||
STRING_REPLACE_ERROR2 "路径未找到 - %s\n"
|
||||
STRING_REPLACE_ERROR3 "文件名、目录名或卷标语法不正确。\n"
|
||||
STRING_REPLACE_ERROR4 "无效的参数组合\n"
|
||||
STRING_REPLACE_ERROR5 "禁止访问 - %s\n"
|
||||
STRING_REPLACE_ERROR6 "没有文件被发现 - %s\n"
|
||||
STRING_REPLACE_ERROR7 "扩展错误 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "错误:无法打开源文件 - %s!\n"
|
||||
STRING_COPY_ERROR3 "写入目标文件时出错!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "按任意键继续... "
|
||||
STRING_CONSOLE_ERROR "未知错误:%d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "内存不足。\n"
|
||||
END
|
49
base/applications/cmdutils/replace/lang/zh-TW.rc
Normal file
49
base/applications/cmdutils/replace/lang/zh-TW.rc
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Chinese (Traditional) resource file
|
||||
* TRANSLATORS: Copyright 2015 Henry Tang Ih <henrytang2@hotmail.com>
|
||||
* Copyright 2021 Chan Chilung <eason066@gmail.com>
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
STRING_REPLACE_HELP1 "取代檔案。\n\n\
|
||||
REPLACE [磁碟機1:][路徑1]檔案名稱 [磁碟機2:][路徑2] [/A] [/P] [/R] [/W]\n\
|
||||
REPLACE [磁碟機1:][路徑1]檔案名稱 [磁碟機2:][路徑2] [/P] [/R] [/S] [/W] [/U]\n\n\
|
||||
[磁碟機1:][路徑1]檔案名稱 指定一個或多個原始檔。\n\
|
||||
[磁碟機2:][路徑2] 指定要被取代檔案所在的目錄。\n\
|
||||
/A 將新檔案新增到目標目錄。不能和 /S 或 /U 同時使用。\n\
|
||||
/P 在取代一個檔案或新增一個原始檔之前請求確認。\n\
|
||||
/R 將只讀檔案視為未保護檔案並取代。\n\
|
||||
/S 取代目標目錄中所有子目錄中的檔案。不能與 /A 同時使用。\n\
|
||||
/W 在開始前等待您插入一張磁碟。\n\
|
||||
/U 僅取代(更新)比原檔案舊的檔案。不能和 /A 同時使用。\n"
|
||||
STRING_REPLACE_HELP2 "需要來源路徑\n"
|
||||
STRING_REPLACE_HELP3 "沒有檔案被取代\n"
|
||||
STRING_REPLACE_HELP4 "%lu 個檔案已被取代\n"
|
||||
STRING_REPLACE_HELP5 "正在取代 %s\n"
|
||||
STRING_REPLACE_HELP6 "取代 %s\n"
|
||||
STRING_REPLACE_HELP7 "沒有檔案被新增\n"
|
||||
STRING_REPLACE_HELP8 "%lu 個檔案已被新增\n"
|
||||
STRING_REPLACE_HELP9 "新增 %s 嗎 (Y/N)?"
|
||||
STRING_REPLACE_HELP10 "取代 %s 嗎 (Y/N)?"
|
||||
STRING_REPLACE_HELP11 "正在新增 %s\n"
|
||||
|
||||
STRING_REPLACE_ERROR1 "無效開關 - %s\n"
|
||||
STRING_REPLACE_ERROR2 "找不到路徑 - %s\n"
|
||||
STRING_REPLACE_ERROR3 "檔案名稱、目錄名稱或磁碟區標籤語法不正確。\n"
|
||||
STRING_REPLACE_ERROR4 "無效的參陣組合\n"
|
||||
STRING_REPLACE_ERROR5 "存取被拒 - %s\n"
|
||||
STRING_REPLACE_ERROR6 "找不到檔案 - %s\n"
|
||||
STRING_REPLACE_ERROR7 "擴展錯誤 32\n"
|
||||
|
||||
STRING_COPY_OPTION "YNA"
|
||||
STRING_COPY_ERROR1 "錯誤:無法開啟來源 - %s!\n"
|
||||
STRING_COPY_ERROR3 "寫入目的時出錯!\n"
|
||||
STRING_ERROR_D_PAUSEMSG "按任意鍵繼續... "
|
||||
STRING_CONSOLE_ERROR "未知錯誤:%d\n"
|
||||
STRING_ERROR_OUT_OF_MEMORY "記憶體不足。\n"
|
||||
END
|
603
base/applications/cmdutils/replace/replace.c
Normal file
603
base/applications/cmdutils/replace/replace.c
Normal file
|
@ -0,0 +1,603 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Implements 'replace' command
|
||||
* COPYRIGHT: Copyright Samuel Erdtman (samuel@erdtman.se)
|
||||
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
|
||||
*/
|
||||
|
||||
#include "replace.h"
|
||||
|
||||
enum
|
||||
{
|
||||
REPLACE_ADD = 0x001, /* /A */
|
||||
REPLACE_CONFIRM = 0x002, /* /P */
|
||||
REPLACE_READ_ONLY = 0x004, /* /R */
|
||||
REPLACE_SUBDIR = 0x008, /* /S */
|
||||
REPLACE_DISK = 0x010, /* /W */
|
||||
REPLACE_UPDATE = 0x020, /* /U */
|
||||
};
|
||||
|
||||
/* just makes a print out if there is a problem with the switches */
|
||||
void invalid_switch(LPTSTR is)
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR1,is);
|
||||
ConOutResPrintf(STRING_REPLACE_HELP3);
|
||||
}
|
||||
|
||||
/* retrieves the path dependent on the input file name */
|
||||
void getPath(TCHAR* out, LPTSTR in)
|
||||
{
|
||||
if (_tcslen(in) == 2 && in[1] == _T(':'))
|
||||
GetRootPath(in,out,MAX_PATH);
|
||||
else
|
||||
GetFullPathName (in, MAX_PATH, out, NULL);
|
||||
}
|
||||
|
||||
/* makes the replace */
|
||||
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
|
||||
{
|
||||
TCHAR d[MAX_PATH];
|
||||
TCHAR s[MAX_PATH];
|
||||
HANDLE hFileSrc, hFileDest;
|
||||
DWORD dwAttrib, dwRead, dwWritten;
|
||||
LPBYTE buffer;
|
||||
BOOL bEof = FALSE;
|
||||
FILETIME srcCreationTime, destCreationTime, srcLastAccessTime, destLastAccessTime;
|
||||
FILETIME srcLastWriteTime, destLastWriteTime;
|
||||
GetPathCase(source, s);
|
||||
GetPathCase(dest, d);
|
||||
s[0] = _totupper(s[0]);
|
||||
d[0] = _totupper(d[0]);
|
||||
// ConOutPrintf(_T("old-src: %s\n"), s);
|
||||
// ConOutPrintf(_T("old-dest: %s\n"), d);
|
||||
// ConOutPrintf(_T("src: %s\n"), source);
|
||||
// ConOutPrintf(_T("dest: %s\n"), dest);
|
||||
|
||||
/* Open up the sourcefile */
|
||||
hFileSrc = CreateFile (source, GENERIC_READ, FILE_SHARE_READ,NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (hFileSrc == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ConOutResPrintf(STRING_COPY_ERROR1, source);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the time from source file to be used in the comparison
|
||||
* with dest time if update switch is set.
|
||||
*/
|
||||
GetFileTime (hFileSrc, &srcCreationTime, &srcLastAccessTime, &srcLastWriteTime);
|
||||
|
||||
/*
|
||||
* Retrieve the source attributes so that they later on
|
||||
* can be inserted in to the destination.
|
||||
*/
|
||||
dwAttrib = GetFileAttributes (source);
|
||||
|
||||
if (IsExistingFile (dest))
|
||||
{
|
||||
/*
|
||||
* Resets the attributes to avoid problems with read only files,
|
||||
* checks for read only has been made earlier.
|
||||
*/
|
||||
SetFileAttributes(dest,FILE_ATTRIBUTE_NORMAL);
|
||||
/*
|
||||
* Is the update flas set? The time has to be controled so that
|
||||
* only older files are replaced.
|
||||
*/
|
||||
if (dwFlags & REPLACE_UPDATE)
|
||||
{
|
||||
/* Read destination time */
|
||||
hFileDest = CreateFile(dest, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
|
||||
0, NULL);
|
||||
|
||||
if (hFileDest == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ConOutResPrintf(STRING_COPY_ERROR1, dest);
|
||||
CloseHandle (hFileSrc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Compare time */
|
||||
GetFileTime (hFileDest, &destCreationTime, &destLastAccessTime, &destLastWriteTime);
|
||||
if (!((srcLastWriteTime.dwHighDateTime > destLastWriteTime.dwHighDateTime) ||
|
||||
(srcLastWriteTime.dwHighDateTime == destLastWriteTime.dwHighDateTime &&
|
||||
srcLastWriteTime.dwLowDateTime > destLastWriteTime.dwLowDateTime)))
|
||||
{
|
||||
CloseHandle (hFileSrc);
|
||||
CloseHandle (hFileDest);
|
||||
return 0;
|
||||
}
|
||||
CloseHandle (hFileDest);
|
||||
}
|
||||
/* Delete the old file */
|
||||
DeleteFile (dest);
|
||||
}
|
||||
|
||||
/* Check confirm flag, and take appropriate action */
|
||||
if (dwFlags & REPLACE_CONFIRM)
|
||||
{
|
||||
/* Output depending on add flag */
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
ConOutResPrintf(STRING_REPLACE_HELP9, dest);
|
||||
else
|
||||
ConOutResPrintf(STRING_REPLACE_HELP10, dest);
|
||||
if ( !FilePromptYNA (0))
|
||||
{
|
||||
CloseHandle (hFileSrc);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Output depending on add flag */
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
ConOutResPrintf(STRING_REPLACE_HELP11, dest);
|
||||
else
|
||||
ConOutResPrintf(STRING_REPLACE_HELP5, dest);
|
||||
|
||||
/* Make sure source and destination is not the same */
|
||||
if (!_tcscmp(s, d))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR7);
|
||||
CloseHandle (hFileSrc);
|
||||
*doMore = FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Open destination file to write to */
|
||||
hFileDest = CreateFile (dest, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
|
||||
if (hFileDest == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
CloseHandle (hFileSrc);
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR7);
|
||||
*doMore = FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get buffer for the copy process */
|
||||
buffer = VirtualAlloc(NULL, BUFF_SIZE, MEM_COMMIT, PAGE_READWRITE);
|
||||
if (buffer == NULL)
|
||||
{
|
||||
CloseHandle (hFileDest);
|
||||
CloseHandle (hFileSrc);
|
||||
ConOutResPrintf(STRING_ERROR_OUT_OF_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Put attribute and time to the new destination file */
|
||||
SetFileAttributes (dest, dwAttrib);
|
||||
SetFileTime (hFileDest, &srcCreationTime, &srcLastAccessTime, &srcLastWriteTime);
|
||||
do
|
||||
{
|
||||
/* Read data from source */
|
||||
ReadFile (hFileSrc, buffer, BUFF_SIZE, &dwRead, NULL);
|
||||
|
||||
/* Done? */
|
||||
if (dwRead == 0)
|
||||
break;
|
||||
|
||||
/* Write to destination file */
|
||||
WriteFile (hFileDest, buffer, dwRead, &dwWritten, NULL);
|
||||
|
||||
/* Done! or ctrl break! */
|
||||
if (dwWritten != dwRead || bCtrlBreak)
|
||||
{
|
||||
ConOutResPuts(STRING_COPY_ERROR3);
|
||||
VirtualFree (buffer, 0, MEM_RELEASE);
|
||||
CloseHandle (hFileDest);
|
||||
CloseHandle (hFileSrc);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
while (!bEof);
|
||||
|
||||
/* Return memory and close files */
|
||||
VirtualFree (buffer, 0, MEM_RELEASE);
|
||||
CloseHandle (hFileDest);
|
||||
CloseHandle (hFileSrc);
|
||||
|
||||
/* Return one file replaced */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Function to iterate over source files and call replace for each of them */
|
||||
INT recReplace(DWORD dwFlags,
|
||||
TCHAR szSrcPath[MAX_PATH],
|
||||
TCHAR szDestPath[MAX_PATH],
|
||||
BOOL *doMore)
|
||||
{
|
||||
TCHAR tmpDestPath[MAX_PATH], tmpSrcPath[MAX_PATH];
|
||||
INT filesReplaced=0;
|
||||
INT_PTR i;
|
||||
DWORD dwAttrib = 0;
|
||||
HANDLE hFile;
|
||||
WIN32_FIND_DATA findBuffer;
|
||||
|
||||
/* Get file handle to the sourcefile(s) */
|
||||
hFile = FindFirstFile (szSrcPath, &findBuffer);
|
||||
|
||||
/*
|
||||
* Strip the paths back to the folder they are in, so that
|
||||
* the different filenames can be added if more than one.
|
||||
*/
|
||||
for(i = (_tcslen(szSrcPath) - 1); i > -1; i--)
|
||||
{
|
||||
if (szSrcPath[i] != _T('\\'))
|
||||
szSrcPath[i] = _T('\0');
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
/* Go through all the sourcefiles and copy/replace them */
|
||||
do
|
||||
{
|
||||
if (bCtrlBreak)
|
||||
return filesReplaced;
|
||||
|
||||
/* Problem with file handler */
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
return filesReplaced;
|
||||
|
||||
/* We do not want to replace any .. . ocr directory */
|
||||
if (!_tcscmp (findBuffer.cFileName, _T(".")) ||
|
||||
!_tcscmp (findBuffer.cFileName, _T(".."))||
|
||||
findBuffer.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
continue;
|
||||
|
||||
/* Add filename to destpath */
|
||||
_tcscpy(tmpDestPath,szDestPath);
|
||||
_tcscat (tmpDestPath, findBuffer.cFileName);
|
||||
|
||||
dwAttrib = GetFileAttributes(tmpDestPath);
|
||||
/* Check add flag */
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
{
|
||||
if (IsExistingFile(tmpDestPath))
|
||||
continue;
|
||||
else
|
||||
dwAttrib = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!IsExistingFile(tmpDestPath))
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check if file is read only, if so check if that should be ignored */
|
||||
if (dwAttrib & FILE_ATTRIBUTE_READONLY)
|
||||
{
|
||||
if (!(dwFlags & REPLACE_READ_ONLY))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR5, tmpDestPath);
|
||||
*doMore = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add filename to sourcepath, insted of wildcards */
|
||||
_tcscpy(tmpSrcPath,szSrcPath);
|
||||
_tcscat (tmpSrcPath, findBuffer.cFileName);
|
||||
|
||||
/* Make the replace */
|
||||
if (replace(tmpSrcPath,tmpDestPath, dwFlags, doMore))
|
||||
{
|
||||
filesReplaced++;
|
||||
}
|
||||
else if (!*doMore)
|
||||
{
|
||||
/* The file to be replaced was the same as the source */
|
||||
filesReplaced = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Take next sourcefile if any */
|
||||
} while(FindNextFile (hFile, &findBuffer));
|
||||
|
||||
FindClose(hFile);
|
||||
|
||||
return filesReplaced;
|
||||
}
|
||||
|
||||
/* If /s switch is specifyed all subdirs has to be considered */
|
||||
INT recFindSubDirs(DWORD dwFlags,
|
||||
TCHAR szSrcPath[MAX_PATH],
|
||||
TCHAR szDestPath[MAX_PATH],
|
||||
BOOL *doMore)
|
||||
{
|
||||
HANDLE hFile;
|
||||
WIN32_FIND_DATA findBuffer;
|
||||
TCHAR tmpDestPath[MAX_PATH], tmpSrcPath[MAX_PATH];
|
||||
INT filesReplaced = 0;
|
||||
INT_PTR i;
|
||||
|
||||
/*
|
||||
* Add a wildcard to dest end so the it will be easy to iterate
|
||||
* over all the files and directorys in the dest directory.
|
||||
*/
|
||||
_tcscat(szDestPath, _T("*"));
|
||||
|
||||
/* Get the first file in the directory */
|
||||
hFile = FindFirstFile (szDestPath, &findBuffer);
|
||||
|
||||
/* Remove the star added earlier to dest path */
|
||||
for(i = (_tcslen(szDestPath) - 1); i > -1; i--)
|
||||
{
|
||||
if (szDestPath[i] != _T('\\'))
|
||||
szDestPath[i] = _T('\0');
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
/* Iterate over all filed directories in the dest dir */
|
||||
do
|
||||
{
|
||||
/* Save the source path so that it will not be wrecked */
|
||||
_tcscpy(tmpSrcPath,szSrcPath);
|
||||
/* Check for reading problems */
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ConOutFormatMessage (GetLastError(), tmpSrcPath);
|
||||
return filesReplaced;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the we should enter the dir or if it is a file
|
||||
* or . or .. if so thake the next object to process.
|
||||
*/
|
||||
if (!_tcscmp (findBuffer.cFileName, _T(".")) ||
|
||||
!_tcscmp (findBuffer.cFileName, _T(".."))||
|
||||
IsExistingFile(findBuffer.cFileName))
|
||||
continue;
|
||||
/* Add the destpath and the new dir path to tempDestPath */
|
||||
_tcscpy(tmpDestPath,szDestPath);
|
||||
_tcscat (tmpDestPath, findBuffer.cFileName);
|
||||
/* Make sure that we have a directory */
|
||||
if (IsExistingDirectory(tmpDestPath))
|
||||
{
|
||||
/* Add a \ to the end or the path */
|
||||
if (szDestPath[_tcslen(tmpDestPath) - 1] != _T('\\'))
|
||||
_tcscat(tmpDestPath, _T("\\"));
|
||||
/* Call the function to replace files in the new directory */
|
||||
filesReplaced += recReplace(dwFlags, tmpSrcPath, tmpDestPath, doMore);
|
||||
/* If there were problems break e.g. read-only file */
|
||||
if (!*doMore)
|
||||
break;
|
||||
_tcscpy(tmpSrcPath,szSrcPath);
|
||||
/* Control the next level of subdirs */
|
||||
filesReplaced += recFindSubDirs(dwFlags,tmpSrcPath,tmpDestPath, doMore);
|
||||
if (!*doMore)
|
||||
break;
|
||||
}
|
||||
/* Get the next handle */
|
||||
} while(FindNextFile (hFile, &findBuffer));
|
||||
|
||||
FindClose(hFile);
|
||||
|
||||
return filesReplaced;
|
||||
}
|
||||
|
||||
INT cmd_replace(INT argc, WCHAR **argv)
|
||||
{
|
||||
LPTSTR *arg;
|
||||
INT i, filesReplaced = 0, nFiles, srcIndex = -1, destIndex = -1;
|
||||
DWORD dwFlags = 0;
|
||||
TCHAR szDestPath[MAX_PATH], szSrcPath[MAX_PATH], tmpSrcPath[MAX_PATH];
|
||||
BOOL doMore = TRUE;
|
||||
|
||||
--argc;
|
||||
++argv;
|
||||
|
||||
/* Help wanted? */
|
||||
if (argc == 1 && !_tcscmp(argv[0], _T("/?")))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_HELP1);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* Divide the argument in to an array of c-strings */
|
||||
arg = argv;
|
||||
nFiles = argc;
|
||||
|
||||
/* Read options */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (arg[i][0] == _T('/'))
|
||||
{
|
||||
if (_tcslen(arg[i]) == 2)
|
||||
{
|
||||
switch (_totupper(arg[i][1]))
|
||||
{
|
||||
case _T('A'):
|
||||
dwFlags |= REPLACE_ADD;
|
||||
break;
|
||||
case _T('P'):
|
||||
dwFlags |= REPLACE_CONFIRM;
|
||||
break;
|
||||
case _T('R'):
|
||||
dwFlags |= REPLACE_READ_ONLY;
|
||||
break;
|
||||
case _T('S'):
|
||||
dwFlags |= REPLACE_SUBDIR;
|
||||
break;
|
||||
case _T('W'):
|
||||
dwFlags |= REPLACE_DISK;
|
||||
break;
|
||||
case _T('U'):
|
||||
dwFlags |= REPLACE_UPDATE;
|
||||
break;
|
||||
default:
|
||||
invalid_switch(arg[i]);
|
||||
return 11; /* Error */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
invalid_switch(arg[i]);
|
||||
return 11; /* Error */
|
||||
}
|
||||
nFiles--;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (srcIndex == -1)
|
||||
{
|
||||
srcIndex = i;
|
||||
}
|
||||
else if (destIndex == -1)
|
||||
{
|
||||
destIndex = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
invalid_switch(arg[i]);
|
||||
return 11; /* Error */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* See so that at least source is there */
|
||||
if (nFiles < 1)
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_HELP2);
|
||||
ConOutResPrintf(STRING_REPLACE_HELP3);
|
||||
return 11; /* Error */
|
||||
}
|
||||
|
||||
/* Check so that not both update and add switch is added and subdir */
|
||||
if ((dwFlags & REPLACE_UPDATE || dwFlags & REPLACE_SUBDIR) && (dwFlags & REPLACE_ADD))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR4);
|
||||
ConOutResPrintf(STRING_REPLACE_HELP7);
|
||||
return 11; /* Error */
|
||||
}
|
||||
|
||||
/* If we have a destination get the full path */
|
||||
if (destIndex != -1)
|
||||
{
|
||||
if (_tcslen(arg[destIndex]) == 2 && arg[destIndex][1] == ':')
|
||||
GetRootPath(arg[destIndex],szDestPath,MAX_PATH);
|
||||
else
|
||||
{
|
||||
/* Check for wildcards in destination directory */
|
||||
if (_tcschr (arg[destIndex], _T('*')) != NULL ||
|
||||
_tcschr (arg[destIndex], _T('?')) != NULL)
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR2,arg[destIndex]);
|
||||
ConOutResPrintf(STRING_REPLACE_HELP3);
|
||||
return 3; /* Error */
|
||||
}
|
||||
getPath(szDestPath, arg[destIndex]);
|
||||
/* Make sure that destination exists */
|
||||
if (!IsExistingDirectory(szDestPath))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR2, szDestPath);
|
||||
ConOutResPrintf(STRING_REPLACE_HELP3);
|
||||
return 3; /* Error */
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Dest is current dir */
|
||||
GetCurrentDirectory(MAX_PATH,szDestPath);
|
||||
}
|
||||
|
||||
/* Get the full source path */
|
||||
if (!(_tcslen(arg[srcIndex]) == 2 && arg[srcIndex][1] == ':'))
|
||||
getPath(szSrcPath, arg[srcIndex]);
|
||||
else
|
||||
_tcscpy(szSrcPath,arg[srcIndex]);
|
||||
|
||||
/* Source does not have wildcards */
|
||||
if (_tcschr (arg[srcIndex], _T('*')) == NULL &&
|
||||
_tcschr (arg[srcIndex], _T('?')) == NULL)
|
||||
{
|
||||
/* Check so that source is not a directory, because that is not allowed */
|
||||
if (IsExistingDirectory(szSrcPath))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR6, szSrcPath);
|
||||
ConOutResPrintf(STRING_REPLACE_HELP3);
|
||||
return 2; /* Error */
|
||||
}
|
||||
/* Check if the file exists */
|
||||
if (!IsExistingFile(szSrcPath))
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_HELP3);
|
||||
return 2; /* Error */
|
||||
}
|
||||
}
|
||||
|
||||
/* /w switch is set so wait for any key to be pressed */
|
||||
if (dwFlags & REPLACE_DISK)
|
||||
{
|
||||
msg_pause();
|
||||
cgetchar();
|
||||
}
|
||||
|
||||
/* Add an extra \ to the destination path if needed */
|
||||
if (szDestPath[_tcslen(szDestPath) - 1] != _T('\\'))
|
||||
_tcscat(szDestPath, _T("\\"));
|
||||
|
||||
/* Save source path */
|
||||
_tcscpy(tmpSrcPath,szSrcPath);
|
||||
/* Replace in dest dir */
|
||||
filesReplaced += recReplace(dwFlags, tmpSrcPath, szDestPath, &doMore);
|
||||
/* If subdir switch is set replace in the subdirs to */
|
||||
if (dwFlags & REPLACE_SUBDIR && doMore)
|
||||
{
|
||||
filesReplaced += recFindSubDirs(dwFlags, szSrcPath, szDestPath, &doMore);
|
||||
}
|
||||
|
||||
/* If source == dest write no more */
|
||||
if (filesReplaced != -1)
|
||||
{
|
||||
/* No files replaced */
|
||||
if (filesReplaced==0)
|
||||
{
|
||||
/* Add switch dependent output */
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
ConOutResPrintf(STRING_REPLACE_HELP7);
|
||||
else
|
||||
ConOutResPrintf(STRING_REPLACE_HELP3);
|
||||
}
|
||||
/* Some files replaced */
|
||||
else
|
||||
{
|
||||
/* Add switch dependent output */
|
||||
if (dwFlags & REPLACE_ADD)
|
||||
ConOutResPrintf(STRING_REPLACE_HELP8, filesReplaced);
|
||||
else
|
||||
ConOutResPrintf(STRING_REPLACE_HELP4, filesReplaced);
|
||||
}
|
||||
}
|
||||
|
||||
/* Return memory */
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static BOOL CALLBACK
|
||||
CtrlHandlerRoutine(DWORD dwCtrlType)
|
||||
{
|
||||
switch (dwCtrlType)
|
||||
{
|
||||
case CTRL_C_EVENT: /* Ctrl+C */
|
||||
case CTRL_CLOSE_EVENT: /* Closing console? */
|
||||
bCtrlBreak = TRUE;
|
||||
return TRUE; /* Handled */
|
||||
|
||||
default:
|
||||
return FALSE; /* Ignored */
|
||||
}
|
||||
}
|
||||
|
||||
int wmain(int argc, WCHAR **argvW)
|
||||
{
|
||||
/* Handle Ctrl+C and console closing */
|
||||
SetConsoleCtrlHandler(CtrlHandlerRoutine, TRUE);
|
||||
|
||||
/* Initialize the Console Standard Streams */
|
||||
ConInitStdStreams();
|
||||
|
||||
return cmd_replace(argc, argvW);
|
||||
}
|
54
base/applications/cmdutils/replace/replace.h
Normal file
54
base/applications/cmdutils/replace/replace.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Main header
|
||||
* COPYRIGHT: Copyright Samuel Erdtman (samuel@erdtman.se)
|
||||
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <stdlib.h>
|
||||
#include <conutils.h>
|
||||
#include "resource.h"
|
||||
|
||||
#define RC_STRING_MAX_SIZE 3072
|
||||
|
||||
#define PROMPT_NO 0
|
||||
#define PROMPT_YES 1
|
||||
#define PROMPT_ALL 2
|
||||
#define PROMPT_BREAK 3
|
||||
|
||||
/* 16k = max buffer size */
|
||||
#define BUFF_SIZE 16384
|
||||
|
||||
#define ConOutResPuts(uID) \
|
||||
ConResPuts(StdOut, (uID))
|
||||
|
||||
#define ConOutResPrintf(uID, ...) \
|
||||
ConResPrintf(StdOut, (uID), ##__VA_ARGS__)
|
||||
|
||||
#define ConOutFormatMessage(MessageId, ...) \
|
||||
ConFormatMessage(StdOut, (MessageId), ##__VA_ARGS__)
|
||||
|
||||
/* util.c */
|
||||
VOID ConInString(LPTSTR lpInput, DWORD dwLength);
|
||||
VOID __cdecl ConFormatMessage(PCON_STREAM Stream, DWORD MessageId, ...);
|
||||
VOID ConOutChar(TCHAR c);
|
||||
VOID GetPathCase(TCHAR * Path, TCHAR * OutPath);
|
||||
BOOL IsExistingFile(IN LPCTSTR pszPath);
|
||||
BOOL IsExistingDirectory(IN LPCTSTR pszPath);
|
||||
INT FilePromptYNA(UINT resID);
|
||||
VOID msg_pause(VOID);
|
||||
TCHAR cgetchar(VOID);
|
||||
|
||||
INT
|
||||
GetRootPath(
|
||||
IN LPCTSTR InPath,
|
||||
OUT LPTSTR OutPath,
|
||||
IN INT size);
|
||||
|
||||
extern BOOL bCtrlBreak;
|
83
base/applications/cmdutils/replace/replace.rc
Normal file
83
base/applications/cmdutils/replace/replace.rc
Normal file
|
@ -0,0 +1,83 @@
|
|||
|
||||
#include <windef.h>
|
||||
#include "resource.h"
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Replace Command"
|
||||
#define REACTOS_STR_INTERNAL_NAME "replace"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "replace.exe"
|
||||
#include <reactos/version.rc>
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
||||
#ifdef LANGUAGE_CS_CZ
|
||||
#include "lang/cs-CZ.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_DE_DE
|
||||
#include "lang/de-DE.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_EL_GR
|
||||
#include "lang/el-GR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_EN_US
|
||||
#include "lang/en-US.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_ES_ES
|
||||
#include "lang/es-ES.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_FR_FR
|
||||
#include "lang/fr-FR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_HU_HU
|
||||
#include "lang/hu-HU.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_ID_ID
|
||||
#include "lang/id-ID.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_IT_IT
|
||||
#include "lang/it-IT.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_NB_NO
|
||||
#include "lang/no-NO.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_JA_JP
|
||||
#include "lang/ja-JP.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_PL_PL
|
||||
#include "lang/pl-PL.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_PT_BR
|
||||
#include "lang/pt-BR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_PT_PT
|
||||
#include "lang/pt-PT.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_RO_RO
|
||||
#include "lang/ro-RO.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_RU_RU
|
||||
#include "lang/ru-RU.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_SK_SK
|
||||
#include "lang/sk-SK.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_SV_SE
|
||||
#include "lang/sv-SE.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_SQ_AL
|
||||
#include "lang/sq-AL.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_TR_TR
|
||||
#include "lang/tr-TR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_UK_UA
|
||||
#include "lang/uk-UA.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_ZH_CN
|
||||
#include "lang/zh-CN.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_ZH_TW
|
||||
#include "lang/zh-TW.rc"
|
||||
#endif
|
28
base/applications/cmdutils/replace/resource.h
Normal file
28
base/applications/cmdutils/replace/resource.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#define STRING_CONSOLE_ERROR 316
|
||||
|
||||
#define STRING_REPLACE_ERROR1 351
|
||||
#define STRING_REPLACE_ERROR2 352
|
||||
#define STRING_REPLACE_ERROR3 353
|
||||
#define STRING_REPLACE_ERROR4 354
|
||||
#define STRING_REPLACE_ERROR5 355
|
||||
#define STRING_REPLACE_ERROR6 356
|
||||
#define STRING_REPLACE_ERROR7 357
|
||||
|
||||
#define STRING_REPLACE_HELP1 727
|
||||
#define STRING_REPLACE_HELP2 728
|
||||
#define STRING_REPLACE_HELP3 729
|
||||
#define STRING_REPLACE_HELP4 730
|
||||
#define STRING_REPLACE_HELP5 731
|
||||
#define STRING_REPLACE_HELP6 732
|
||||
#define STRING_REPLACE_HELP7 733
|
||||
#define STRING_REPLACE_HELP8 734
|
||||
#define STRING_REPLACE_HELP9 735
|
||||
#define STRING_REPLACE_HELP10 736
|
||||
#define STRING_REPLACE_HELP11 737
|
||||
|
||||
#define STRING_COPY_OPTION 201
|
||||
#define STRING_COPY_ERROR1 320
|
||||
#define STRING_COPY_ERROR3 322
|
||||
|
||||
#define STRING_ERROR_OUT_OF_MEMORY 109
|
||||
#define STRING_ERROR_D_PAUSEMSG 111
|
282
base/applications/cmdutils/replace/util.c
Normal file
282
base/applications/cmdutils/replace/util.c
Normal file
|
@ -0,0 +1,282 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Replace Command
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Internal helpers. See cmd/internal.c
|
||||
* COPYRIGHT: Copyright Samuel Erdtman (samuel@erdtman.se)
|
||||
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
|
||||
*/
|
||||
|
||||
#include "replace.h"
|
||||
|
||||
BOOL bCtrlBreak = FALSE; /* Ctrl-Break or Ctrl-C hit */
|
||||
|
||||
/*
|
||||
* Helper function for getting the current path from drive
|
||||
* without changing the drive. Return code: 0 = ok, 1 = fail.
|
||||
* 'InPath' can have any size; if the two first letters are
|
||||
* not a drive with ':' it will get the current path on
|
||||
* the current drive exactly as GetCurrentDirectory() does.
|
||||
*/
|
||||
INT
|
||||
GetRootPath(
|
||||
IN LPCTSTR InPath,
|
||||
OUT LPTSTR OutPath,
|
||||
IN INT size)
|
||||
{
|
||||
if (InPath[0] && InPath[1] == _T(':'))
|
||||
{
|
||||
INT t = 0;
|
||||
|
||||
if ((InPath[0] >= _T('0')) && (InPath[0] <= _T('9')))
|
||||
{
|
||||
t = (InPath[0] - _T('0')) + 28;
|
||||
}
|
||||
else if ((InPath[0] >= _T('a')) && (InPath[0] <= _T('z')))
|
||||
{
|
||||
t = (InPath[0] - _T('a')) + 1;
|
||||
}
|
||||
else if ((InPath[0] >= _T('A')) && (InPath[0] <= _T('Z')))
|
||||
{
|
||||
t = (InPath[0] - _T('A')) + 1;
|
||||
}
|
||||
|
||||
return (_tgetdcwd(t, OutPath, size) == NULL);
|
||||
}
|
||||
|
||||
/* Get current directory */
|
||||
return !GetCurrentDirectory(size, OutPath);
|
||||
}
|
||||
|
||||
/*
|
||||
* Takes a path in and returns it with the correct case of the letters
|
||||
*/
|
||||
VOID GetPathCase( TCHAR * Path, TCHAR * OutPath)
|
||||
{
|
||||
UINT i = 0;
|
||||
TCHAR TempPath[MAX_PATH];
|
||||
WIN32_FIND_DATA FindFileData;
|
||||
HANDLE hFind;
|
||||
_tcscpy(TempPath, _T(""));
|
||||
_tcscpy(OutPath, _T(""));
|
||||
|
||||
for(i = 0; i < _tcslen(Path); i++)
|
||||
{
|
||||
if (Path[i] != _T('\\'))
|
||||
{
|
||||
_tcsncat(TempPath, &Path[i], 1);
|
||||
if (i != _tcslen(Path) - 1)
|
||||
continue;
|
||||
}
|
||||
/* Handle the base part of the path different.
|
||||
Because if you put it into findfirstfile, it will
|
||||
return your current folder */
|
||||
if (_tcslen(TempPath) == 2 && TempPath[1] == _T(':'))
|
||||
{
|
||||
_tcscat(OutPath, TempPath);
|
||||
_tcscat(OutPath, _T("\\"));
|
||||
_tcscat(TempPath, _T("\\"));
|
||||
}
|
||||
else
|
||||
{
|
||||
hFind = FindFirstFile(TempPath,&FindFileData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
_tcscpy(OutPath, Path);
|
||||
return;
|
||||
}
|
||||
_tcscat(TempPath, _T("\\"));
|
||||
_tcscat(OutPath, FindFileData.cFileName);
|
||||
_tcscat(OutPath, _T("\\"));
|
||||
FindClose(hFind);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if a file exists (is accessible)
|
||||
*/
|
||||
BOOL IsExistingFile(IN LPCTSTR pszPath)
|
||||
{
|
||||
DWORD attr = GetFileAttributes(pszPath);
|
||||
return ((attr != INVALID_FILE_ATTRIBUTES) && !(attr & FILE_ATTRIBUTE_DIRECTORY));
|
||||
}
|
||||
|
||||
BOOL IsExistingDirectory(IN LPCTSTR pszPath)
|
||||
{
|
||||
DWORD attr = GetFileAttributes(pszPath);
|
||||
return ((attr != INVALID_FILE_ATTRIBUTES) && (attr & FILE_ATTRIBUTE_DIRECTORY));
|
||||
}
|
||||
|
||||
INT FilePromptYNA (UINT resID)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
// TCHAR cKey = 0;
|
||||
// LPTSTR szKeys = _T("yna");
|
||||
|
||||
TCHAR szIn[10];
|
||||
LPTSTR p;
|
||||
|
||||
if (resID != 0)
|
||||
ConOutResPrintf (resID);
|
||||
|
||||
/* preliminary fix */
|
||||
ConInString(szIn, 10);
|
||||
|
||||
_tcsupr (szIn);
|
||||
for (p = szIn; _istspace (*p); p++)
|
||||
;
|
||||
|
||||
LoadString(NULL, STRING_COPY_OPTION, szMsg, ARRAYSIZE(szMsg));
|
||||
|
||||
if (_tcsncmp(p, &szMsg[0], 1) == 0)
|
||||
return PROMPT_YES;
|
||||
else if (_tcsncmp(p, &szMsg[1], 1) == 0)
|
||||
return PROMPT_NO;
|
||||
else if (_tcsncmp(p, &szMsg[2], 1) == 0)
|
||||
return PROMPT_ALL;
|
||||
#if 0
|
||||
else if (*p == _T('\03'))
|
||||
return PROMPT_BREAK;
|
||||
#endif
|
||||
|
||||
return PROMPT_NO;
|
||||
|
||||
/* unfinished solution */
|
||||
#if 0
|
||||
RemoveBreakHandler();
|
||||
ConInDisable();
|
||||
|
||||
do
|
||||
{
|
||||
ConInKey (&ir);
|
||||
cKey = _totlower (ir.Event.KeyEvent.uChar.AsciiChar);
|
||||
if (_tcschr (szKeys, cKey[0]) == NULL)
|
||||
cKey = 0;
|
||||
}
|
||||
while ((ir.Event.KeyEvent.wVirtualKeyCode == VK_SHIFT) ||
|
||||
(ir.Event.KeyEvent.wVirtualKeyCode == VK_MENU) ||
|
||||
(ir.Event.KeyEvent.wVirtualKeyCode == VK_CONTROL));
|
||||
|
||||
AddBreakHandler();
|
||||
ConInEnable();
|
||||
|
||||
if ((ir.Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE) ||
|
||||
((ir.Event.KeyEvent.wVirtualKeyCode == _T('C')) &&
|
||||
(ir.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))))
|
||||
return PROMPT_BREAK;
|
||||
|
||||
return PROMPT_YES;
|
||||
#endif
|
||||
}
|
||||
|
||||
VOID ConInString(LPTSTR lpInput, DWORD dwLength)
|
||||
{
|
||||
DWORD dwOldMode;
|
||||
DWORD dwRead = 0;
|
||||
HANDLE hFile;
|
||||
|
||||
LPTSTR p;
|
||||
PCHAR pBuf;
|
||||
|
||||
#ifdef _UNICODE
|
||||
pBuf = (PCHAR)malloc(dwLength - 1);
|
||||
#else
|
||||
pBuf = lpInput;
|
||||
#endif
|
||||
ZeroMemory(lpInput, dwLength * sizeof(TCHAR));
|
||||
hFile = GetStdHandle(STD_INPUT_HANDLE);
|
||||
GetConsoleMode(hFile, &dwOldMode);
|
||||
|
||||
SetConsoleMode(hFile, ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
|
||||
|
||||
ReadFile(hFile, (PVOID)pBuf, dwLength - 1, &dwRead, NULL);
|
||||
|
||||
#ifdef _UNICODE
|
||||
MultiByteToWideChar(GetConsoleCP(), 0, pBuf, dwRead, lpInput, dwLength - 1);
|
||||
free(pBuf);
|
||||
#endif
|
||||
for (p = lpInput; *p; p++)
|
||||
{
|
||||
if (*p == _T('\r')) // Terminate at the carriage-return.
|
||||
{
|
||||
*p = _T('\0');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetConsoleMode(hFile, dwOldMode);
|
||||
}
|
||||
|
||||
VOID msg_pause(VOID)
|
||||
{
|
||||
ConOutResPuts(STRING_ERROR_D_PAUSEMSG);
|
||||
}
|
||||
|
||||
VOID __cdecl ConFormatMessage(PCON_STREAM Stream, DWORD MessageId, ...)
|
||||
{
|
||||
INT Len;
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start(arg_ptr, MessageId);
|
||||
Len = ConMsgPrintfV(Stream,
|
||||
FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
MessageId,
|
||||
LANG_USER_DEFAULT,
|
||||
&arg_ptr);
|
||||
va_end(arg_ptr);
|
||||
|
||||
if (Len <= 0)
|
||||
ConResPrintf(Stream, STRING_CONSOLE_ERROR, MessageId);
|
||||
}
|
||||
|
||||
VOID ConOutChar(TCHAR c)
|
||||
{
|
||||
ConWrite(StdOut, &c, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* get a character out-of-band and honor Ctrl-Break characters
|
||||
*/
|
||||
TCHAR
|
||||
cgetchar (VOID)
|
||||
{
|
||||
HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
INPUT_RECORD irBuffer;
|
||||
DWORD dwRead;
|
||||
|
||||
do
|
||||
{
|
||||
ReadConsoleInput (hInput, &irBuffer, 1, &dwRead);
|
||||
if ((irBuffer.EventType == KEY_EVENT) &&
|
||||
(irBuffer.Event.KeyEvent.bKeyDown != FALSE))
|
||||
{
|
||||
if (irBuffer.Event.KeyEvent.dwControlKeyState &
|
||||
(LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))
|
||||
{
|
||||
if (irBuffer.Event.KeyEvent.wVirtualKeyCode == 'C')
|
||||
{
|
||||
bCtrlBreak = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ((irBuffer.Event.KeyEvent.wVirtualKeyCode == VK_SHIFT) ||
|
||||
(irBuffer.Event.KeyEvent.wVirtualKeyCode == VK_MENU) ||
|
||||
(irBuffer.Event.KeyEvent.wVirtualKeyCode == VK_CONTROL))
|
||||
{
|
||||
// Nothing to do
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (TRUE);
|
||||
|
||||
#ifndef _UNICODE
|
||||
return irBuffer.Event.KeyEvent.uChar.AsciiChar;
|
||||
#else
|
||||
return irBuffer.Event.KeyEvent.uChar.UnicodeChar;
|
||||
#endif /* _UNICODE */
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue