[ATTRIB][CMD] Convert the 'attrib' command into a standalone executable

CORE-9444
This commit is contained in:
Eric Kohl 2019-09-21 11:39:01 +02:00
parent 81e27f0be7
commit 432854ee18
53 changed files with 961 additions and 625 deletions

View file

@ -0,0 +1,8 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
add_executable(attrib attrib.c attrib.rc)
set_module_type(attrib win32cui UNICODE)
target_link_libraries(attrib conutils ${PSEH_LIB})
add_importlibs(attrib user32 msvcrt kernel32)
add_cd_file(TARGET attrib DESTINATION reactos/system32 FOR all)

View file

@ -0,0 +1,392 @@
/*
* ATTRIB.C - attrib internal command.
*
*
* History:
*
* 04-Dec-1998 Eric Kohl
* started
*
* 09-Dec-1998 Eric Kohl
* implementation works, except recursion ("attrib /s").
*
* 05-Jan-1999 Eric Kohl
* major rewrite.
* fixed recursion ("attrib /s").
* started directory support ("attrib /s /d").
* updated help text.
*
* 14-Jan-1999 Eric Kohl
* Unicode ready!
*
* 19-Jan-1999 Eric Kohl
* Redirection ready!
*
* 21-Jan-1999 Eric Kohl
* Added check for invalid filenames.
*
* 23-Jan-1999 Eric Kohl
* Added handling of multiple filenames.
*
* 02-Apr-2005 (Magnus Olsen <magnus@greatlord.com>)
* Remove all hardcoded strings in En.rc
*/
#include <stdio.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <wincon.h>
#include <winuser.h>
#include <conutils.h>
#include "resource.h"
CON_SCREEN StdOutScreen = INIT_CON_SCREEN(StdOut);
static
VOID
ErrorMessage(
DWORD dwErrorCode,
LPWSTR szFormat,
...)
{
WCHAR szMsg[RC_STRING_MAX_SIZE];
WCHAR szMessage[1024];
LPWSTR szError;
va_list arg_ptr;
if (dwErrorCode == ERROR_SUCCESS)
return;
if (szFormat)
{
va_start(arg_ptr, szFormat);
vswprintf(szMessage, szFormat, arg_ptr);
va_end(arg_ptr);
}
if (FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR)&szError, 0, NULL))
{
ConPrintf(StdErr, L"%s %s\n", szError, szMessage);
if (szError)
LocalFree(szError);
return;
}
/* Fall back just in case the error is not defined */
LoadStringW(GetModuleHandle(NULL), STRING_CONSOLE_ERROR, szMsg, ARRAYSIZE(szMsg));
if (szFormat)
ConPrintf(StdErr, L"%s -- %s\n", szMsg, szMessage);
else
ConPrintf(StdErr, L"%s\n", szMsg);
}
static
INT
PrintAttribute(
LPWSTR pszPath,
LPWSTR pszFile,
BOOL bRecurse)
{
WIN32_FIND_DATAW findData;
HANDLE hFind;
WCHAR szFullName[MAX_PATH];
LPWSTR pszFileName;
/* prepare full file name buffer */
wcscpy(szFullName, pszPath);
pszFileName = szFullName + wcslen(szFullName);
/* display all subdirectories */
if (bRecurse)
{
/* append file name */
wcscpy(pszFileName, pszFile);
hFind = FindFirstFileW(szFullName, &findData);
if (hFind == INVALID_HANDLE_VALUE)
{
ErrorMessage(GetLastError(), pszFile);
return 1;
}
do
{
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
continue;
if (!wcscmp(findData.cFileName, L".") ||
!wcscmp(findData.cFileName, L".."))
continue;
wcscpy(pszFileName, findData.cFileName);
wcscat(pszFileName, L"\\");
PrintAttribute(szFullName, pszFile, bRecurse);
}
while(FindNextFileW(hFind, &findData));
FindClose(hFind);
}
/* append file name */
wcscpy(pszFileName, pszFile);
/* display current directory */
hFind = FindFirstFileW(szFullName, &findData);
if (hFind == INVALID_HANDLE_VALUE)
{
ErrorMessage(GetLastError(), pszFile);
return 1;
}
do
{
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
continue;
wcscpy(pszFileName, findData.cFileName);
ConPrintf(StdOut,
L"%c %c%c%c %s\n",
(findData.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) ? L'A' : L' ',
(findData.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) ? L'S' : L' ',
(findData.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ? L'H' : L' ',
(findData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? L'R' : L' ',
szFullName);
}
while(FindNextFileW(hFind, &findData));
FindClose(hFind);
return 0;
}
static
INT
ChangeAttribute(
LPWSTR pszPath,
LPWSTR pszFile,
DWORD dwMask,
DWORD dwAttrib,
BOOL bRecurse,
BOOL bDirectories)
{
WIN32_FIND_DATAW findData;
HANDLE hFind;
DWORD dwAttribute;
WCHAR szFullName[MAX_PATH];
LPWSTR pszFileName;
/* prepare full file name buffer */
wcscpy(szFullName, pszPath);
pszFileName = szFullName + wcslen(szFullName);
/* change all subdirectories */
if (bRecurse)
{
/* append file name */
wcscpy(pszFileName, L"*.*");
hFind = FindFirstFileW(szFullName, &findData);
if (hFind == INVALID_HANDLE_VALUE)
{
ErrorMessage(GetLastError(), pszFile);
return 1;
}
do
{
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
if (!wcscmp(findData.cFileName, L".") ||
!wcscmp(findData.cFileName, L".."))
continue;
wcscpy(pszFileName, findData.cFileName);
wcscat(pszFileName, L"\\");
ChangeAttribute(szFullName, pszFile, dwMask,
dwAttrib, bRecurse, bDirectories);
}
}
while (FindNextFileW(hFind, &findData));
FindClose(hFind);
}
/* append file name */
wcscpy(pszFileName, pszFile);
hFind = FindFirstFileW(szFullName, &findData);
if (hFind == INVALID_HANDLE_VALUE)
{
ErrorMessage(GetLastError(), pszFile);
return 1;
}
do
{
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
continue;
wcscpy(pszFileName, findData.cFileName);
dwAttribute = GetFileAttributes (szFullName);
if (dwAttribute != 0xFFFFFFFF)
{
dwAttribute = (dwAttribute & ~dwMask) | dwAttrib;
SetFileAttributes(szFullName, dwAttribute);
}
}
while (FindNextFileW(hFind, &findData));
FindClose(hFind);
return 0;
}
int wmain(int argc, WCHAR *argv[])
{
INT i;
WCHAR szPath[MAX_PATH];
WCHAR szFileName [MAX_PATH];
BOOL bRecurse = FALSE;
BOOL bDirectories = FALSE;
DWORD dwAttrib = 0;
DWORD dwMask = 0;
/* Initialize the Console Standard Streams */
ConInitStdStreams();
/* Print help */
if (argc > 1 && wcscmp(argv[1], L"/?") == 0)
{
ConResPuts(StdOut, STRING_ATTRIB_HELP);
return 0;
}
/* check for options */
for (i = 1; i < argc; i++)
{
if (wcsicmp(argv[i], L"/s") == 0)
bRecurse = TRUE;
else if (wcsicmp(argv[i], L"/d") == 0)
bDirectories = TRUE;
}
/* create attributes and mask */
for (i = 1; i < argc; i++)
{
if (*argv[i] == L'+')
{
if (wcslen(argv[i]) != 2)
{
ConResPrintf(StdErr, STRING_ERROR_INVALID_PARAM_FORMAT, argv[i]);
return -1;
}
switch (towupper(argv[i][1]))
{
case L'A':
dwMask |= FILE_ATTRIBUTE_ARCHIVE;
dwAttrib |= FILE_ATTRIBUTE_ARCHIVE;
break;
case L'H':
dwMask |= FILE_ATTRIBUTE_HIDDEN;
dwAttrib |= FILE_ATTRIBUTE_HIDDEN;
break;
case L'R':
dwMask |= FILE_ATTRIBUTE_READONLY;
dwAttrib |= FILE_ATTRIBUTE_READONLY;
break;
case L'S':
dwMask |= FILE_ATTRIBUTE_SYSTEM;
dwAttrib |= FILE_ATTRIBUTE_SYSTEM;
break;
default:
ConResPrintf(StdErr, STRING_ERROR_INVALID_PARAM_FORMAT, argv[i]);
return -1;
}
}
else if (*argv[i] == L'-')
{
if (wcslen(argv[i]) != 2)
{
ConResPrintf(StdErr, STRING_ERROR_INVALID_PARAM_FORMAT, argv[i]);
return -1;
}
switch (towupper(argv[i][1]))
{
case L'A':
dwMask |= FILE_ATTRIBUTE_ARCHIVE;
dwAttrib &= ~FILE_ATTRIBUTE_ARCHIVE;
break;
case L'H':
dwMask |= FILE_ATTRIBUTE_HIDDEN;
dwAttrib &= ~FILE_ATTRIBUTE_HIDDEN;
break;
case L'R':
dwMask |= FILE_ATTRIBUTE_READONLY;
dwAttrib &= ~FILE_ATTRIBUTE_READONLY;
break;
case L'S':
dwMask |= FILE_ATTRIBUTE_SYSTEM;
dwAttrib &= ~FILE_ATTRIBUTE_SYSTEM;
break;
default:
ConResPrintf(StdErr, STRING_ERROR_INVALID_PARAM_FORMAT, argv[i]);
return -1;
}
}
}
if (argc == 1)
{
DWORD len;
len = GetCurrentDirectory(MAX_PATH, szPath);
if (szPath[len-1] != L'\\')
{
szPath[len] = L'\\';
szPath[len + 1] = UNICODE_NULL;
}
wcscpy(szFileName, L"*.*");
PrintAttribute(szPath, szFileName, bRecurse);
return 0;
}
/* get full file name */
for (i = 1; i < argc; i++)
{
if ((*argv[i] != L'+') && (*argv[i] != L'-') && (*argv[i] != L'/'))
{
LPWSTR p;
GetFullPathName(argv[i], MAX_PATH, szPath, NULL);
p = wcsrchr(szPath, L'\\') + 1;
wcscpy(szFileName, p);
*p = L'\0';
if (dwMask == 0)
PrintAttribute(szPath, szFileName, bRecurse);
else
ChangeAttribute(szPath, szFileName, dwMask,
dwAttrib, bRecurse, bDirectories);
}
}
return 0;
}

View file

@ -0,0 +1,77 @@
#include <windef.h>
#include "resource.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Attribute Command"
#define REACTOS_STR_INTERNAL_NAME "attrib"
#define REACTOS_STR_ORIGINAL_FILENAME "attrib.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_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

View file

@ -0,0 +1,25 @@
/* FILE: base/shell/cmd/lang/cs-CZ.rc
* TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com)
* UPDATED: 2015-04-12
*/
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Displays or changes file attributes.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Sets an attribute\n\
- Clears an attribute\n\
R Read-only file attribute\n\
A Archive file attribute\n\
S System file attribute\n\
H Hidden file attribute\n\
/S Processes matching files in the current directory\n\
and all subdirectories\n\
/D Processes directories as well\n\n\
Type ATTRIB without a parameter to display the attributes of all files.\n"
STRING_CONSOLE_ERROR "Neznámá chyba: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Neplatný formát parametru - %s\n"
END

View file

@ -0,0 +1,22 @@
/* German language file by Klemens Friedl <frik85> 2005-06-03 */
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Zeigt Dateiattribute an oder ändert sie.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] Dateiname ...\n\
[/S [/D]]\n\n\
+ Setzt ein Attribut\n\
- Löscht ein Attribut\n\
R Attribut für 'schreibgeschützte Datei'\n\
A Attribut für 'zu archivierende Datei'\n\
S Attribut für 'Systemdatei'\n\
H Attribut für 'versteckte Datei'\n\
/S Verarbeitet übereinstimmende Dateien im aktuellen Ordner\n\
und in allen Unterordnern.\n\
/D Verarbeitet auch die Ordner.\n\n\
ATTRIB ohne Parameter zeigt die derzeit gesetzten Attribute aller Dateien an."
STRING_CONSOLE_ERROR "Unbekannter Fehler: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Ungültiges Parameterformat - %s\n"
END

View file

@ -0,0 +1,25 @@
/*
* Αρχική έκδοση - Ημιτελής.
* Ελληνική μετάφραση - Απόστολος Αλεξιάδης
*/
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Προβολή ή αλλαγή των χαρακτηριστικών των αρχείων.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Ορισμός ενός χαρακτηριστικού.\n\
- Απαλοιφή ενός χαρακτηριστικού.\n\
R Χαρακτηριστικό αρχείου μόνο για ανάγνωση.\n\
A Χαρακτηριστικό φύλαξης αρχείου.\n\
S Χαρακτηριστικό αρχείου συστήματος.\n\
H Χαρακτηριστικό κρυφού αρχείου.\n\
/S Επεξεργασία των αρχείων που ταιριάζουν στον τρέχοντα κατάλογο\n\
και σε όλους τους υποκαταλόγους.\n\
/D Επεξεργασία καταλόγων επίσης.\n\n\
Πληκτρολογήστε ATTRIB χωρίς παράμετρο, για να εμφανιστούν τα χαρακτηριστικά όλων των αρχείων.\n"
STRING_CONSOLE_ERROR "Άγνωστο σφάλμα: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Μη έγκυρο φορμά παραμέτρου - %s\n"
END

View file

@ -0,0 +1,20 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Displays or changes file attributes.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Sets an attribute\n\
- Clears an attribute\n\
R Read-only file attribute\n\
A Archive file attribute\n\
S System file attribute\n\
H Hidden file attribute\n\
/S Processes matching files in the current directory\n\
and all subdirectories\n\
/D Processes directories as well\n\n\
Type ATTRIB without a parameter to display the attributes of all files.\n"
STRING_CONSOLE_ERROR "Unknown error: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Invalid parameter format - %s\n"
END

View file

@ -0,0 +1,22 @@
/* Spanish translation by HUMA2000, Jose Pedro Fernández Pascual e Ismael Ferreras Morezuelas (Swyter) */
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Muestra o cambia los atributos de los archivos.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Añade un atributo\n\
- Borra un atributo\n\
R Atributo de sólo lectura\n\
A Atributo de archivo\n\
S Atributo de archivo de sistema\n\
H Atributo de archivo oculto\n\
/S Procesa los archivos coincidentes en el directorio actual \n\
y sus subdirectorios\n\
/D Procesa también los directorios\n\n\
Type ATTRIB without a parameter to display the attributes of all files.\n"
STRING_CONSOLE_ERROR "Error desconocido: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Formato de parámetro erróneo - %s\n"
END

View file

@ -0,0 +1,22 @@
/* French translation by Sylvain Pétréolle, Pierre Schweitzer */
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Affiche ou change des attributs de fichiers.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Positionne un attribut\n\
- Enlève un attribut\n\
R Fichier en lecture seule\n\
A Fichier archive\n\
S Fichier système\n\
H Fichier caché\n\
/S Traite les fichiers correspondants dans le répertoire courant\n\
et tous les sous-répertoires\n\
/D Traite également les répertoires\n\n\
Taper ATTRIB sans paramètre pour afficher les attributs de tous les fichiers."
STRING_CONSOLE_ERROR "Erreur inconnue : %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Format de paramètre incorrect - %s\n"
END

View file

@ -0,0 +1,22 @@
/* Hungarian translation by Robert Horvath (talley at cubeclub.hu) 2005 */
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Állományok attribútumok megjelenítése vagy beállításai.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] állomány ...\n\
[/S [/D]]\n\n\
+ bekapcsol egy attribútumot\n\
- kikapcsol egy attribútumot\n\
R Írásvédett állomány\n\
A Archiválandó állomány\n\
S Rendszer állomány\n\
H Rejtett állomány\n\
/S Minden állomány módosítása a mappában és minden\n\
almappábanban\n\
/D Mappákra is érvényesíti\n\n\
Ha ATTRIB-ot paraméter nélkül írod be, megjeleníti a mappában található összes állományt és annak attribútumát.\n"
STRING_CONSOLE_ERROR "Ismeretlen hiba: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Érvénytelen paraméter megadás - %s\n"
END

View file

@ -0,0 +1,22 @@
/* Indonesian language file by Zaenal Mutaqin <ade999 at gmail dot com> 2007-02-15 */
LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Menampilkan atau mengubah atribut file.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Menyetel atribut\n\
- Membersihkan atribut\n\
R Atribut file Hanya-baca\n\
A Atribut file Arsip\n\
S Atribut file Sistem\n\
H Atribut file Tersembunyi\n\
/S Proses file yang sama dalam direktori dan semua subdirektori\n\
saat ini\n\
/D Proses direktori juga\n\n\
Ketik ATTRIB tanpa parameter untuk menampilkan atribut dari semua file.\n"
STRING_CONSOLE_ERROR "Kesalahan tidak dikenal: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Format parameter tidak benar - %s\n"
END

View file

@ -0,0 +1,20 @@
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Visualizza o modifica gli attributi dei file.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Attiva un attributo\n\
- Toglie un attributo\n\
R Attributo di file di sola lettura\n\
A Attributo di file di archivio\n\
S Attributo di file di sistema\n\
H Attributo di file nascosto\n\
/S Tratta i file indicati nella cartella corrente e in\n\
tutte le sottocartelle\n\
/D Tratta anche le cartelle\n\n\
Scrivi ATTRIB senza parametri per visualizzare gli attributi di tutti i file.\n"
STRING_CONSOLE_ERROR "Errore sconosciuto: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Formato dei parametri non valido - %s\n"
END

View file

@ -0,0 +1,20 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "ファイル属性を表示または変更します。\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [ファイル] ...\n\
[/S [/D]]\n\n\
+ 属性を設定します。\n\
- 属性を解除します。\n\
R 読みとり専用属性。\n\
A アーカイブ属性。\n\
S システム ファイル属性。\n\
H 隠しファイル属性。\n\
/S 現在のフォルダとすべてのサブフォルダの一致するファイルを\n\
処理します。\n\
/D フォルダも処理します。\n\n\
パラメータを指定しないで ATTRIB と入力すると、すべてのファイルの属性を表示します。\n"
STRING_CONSOLE_ERROR "不明なエラー: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "無効なパラメータの書式です。 - %s\n"
END

View file

@ -0,0 +1,20 @@
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Viser eller endrer filattributtene.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] fil ...\n\
[/S [/D]]\n\n\
+ Setter et attributt\n\
- Fjerner et attributt\n\
R Attributt: Skrivebeskyttet.\n\
A Attributt: Arkiver.\n\
S Attributt: System.\n\
H Attributt: Skjult.\n\
/S Behandler tilsvarende filer i gjeldende mappe\n\
og alle undermapper.\n\
/D Bearbeider også mapper.\n\n\
Skriv ATTRIB uten parametere for å vise attributtene til alle filer.\n"
STRING_CONSOLE_ERROR "Ukjent feil: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Ugyldig parameter format - %s\n"
END

View file

@ -0,0 +1,29 @@
/*
* Translated by Caemyr - Olaf Siejka (Jan, 2008)
* Updated by niski - Maciej Bialas (Mar, 2010)
* Use ReactOS forum PM or IRC to contact me
* http://www.reactos.org
* IRC: irc.freenode.net #reactos-pl;
* UTF-8 conversion by Caemyr (May, 2011)
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Wyświetla lub zmienia atrybuty plików.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] nazwa_pliku ...\n\
[/S [/D]]\n\n\
+ Ustawia atrybut\n\
- Czyści atrybut\n\
R Atrybut pliku tylko do odczytu\n\
A Atrybut pliku archiwalnego\n\
S Atrybut pliku systemowego\n\
H Atrybut pliku ukrytego\n\
/S Przetwarza wszystkie, pasujące pliki w bieżącym katalogu\n\
i we wszystkich podkatalogach\n\
/D Przetwarza również katalogi\n\n\
Wpisz ATTRIB bez żadnego parametru, by wyświetlić atrybuty wszystkich plików.\n"
STRING_CONSOLE_ERROR "Nieznany błąd: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Niewłaściwy format parametru - %s\n"
END

View file

@ -0,0 +1,22 @@
/* Translator: Ștefan Fulea (stefan dot fulea at mail dot com) */
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Afișează sau modifică atributele de fișiere.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] fișier ...\n\
[/S [/D]]\n\n\
+ Consimte atributul\n\
- Reprobă atributul\n\
R Atributul fișierelor nemodificabile\n\
A Atributul fișierelor arhivabile\n\
S Atributul fișierelor de sistem\n\
H Atributul fișierelor ascunse\n\
/S Aplică și pentru fișierele din subdirectoare\n\
/D Aplică și pentru directoare\n\n\
Tastați ATTRIB fără argumente pentru afișarea atributelor pentru\n\
toate fișierele.\n"
STRING_CONSOLE_ERROR "Eroare necunoscută: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Formatul argumentului este eronat - %s\n"
END

View file

@ -0,0 +1,22 @@
/* Russian translation by Andrey Korotaev (unC0Rr@inbox.ru) & Aleksey Bragin (aleksey@reactos.org) & Kudratov Olimjon (olim98@bk.ru)*/
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Вывод и изменение атрибутов файлов.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] файл ...\n\
[/S [/D]]\n\n\
+ Установка атрибута.\n\
- Снятие атрибута.\n\
R Атрибут ""Только чтение"".\n\
A Атрибут ""Архивный"".\n\
S Атрибут ""Системный"".\n\
H Атрибут ""Скрытый"".\n\
/S Обработка файлов с указанными именами в текущей папке\n\
и во всех ее подпапках.\n\
/D Обработка и файлов, и папок.\n\n\
Команда ATTRIB без параметров выводит атрибуты всех файлов.\n"
STRING_CONSOLE_ERROR "Неизвестная ошибка: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Неверный формат параметра - %s\n"
END

View file

@ -0,0 +1,26 @@
/* Slovak translation for CMD
* TRANSLATOR: Mário Kačmár /Mario Kacmar/ aka Kario (kario@szm.sk)
* DATE OF TR: 21-03-2009
* LastChange: 10-08-2010
*/
LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Displays or changes file attributes.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Sets an attribute\n\
- Clears an attribute\n\
R Read-only file attribute\n\
A Archive file attribute\n\
S System file attribute\n\
H Hidden file attribute\n\
/S Processes matching files in the current directory\n\
and all subdirectories\n\
/D Processes directories as well\n\n\
Type ATTRIB without a parameter to display the attributes of all files.\n"
STRING_CONSOLE_ERROR "Neznáma chyba: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Invalid parameter format - %s\n"
END

View file

@ -0,0 +1,24 @@
/* TRANSLATOR : Ardit Dani (Ard1t) (ardit.dani@gmail.com)
* DATE OF TR: 29-11-2013
*/
LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Shfaq ose ndryshu atributet e dokumentave.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
[/S [/D]]\n\n\
+ Vendos nje atribute\n\
- Pastron një atribute\n\
R Lexo-vetem atributet e dokumentave\n\
A Atributet e dokumentave në arkiv\n\
S Atributet e dokumentave të sistemit\n\
H Atributet e dokumentave te fshehur\n\
/S Procesi i përputhjes së dokumentave ne skedën aktuale\n\
dhe të gjitha nënskedat\n\
/D Proçeso skedat gjithashtu\n\n\
Shkruaj ATTRIB pa një parameter për të shfaque atributet e të gjithë dokumentave.\n"
STRING_CONSOLE_ERROR "Error i paditur: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Parametrat e formatit invalid - %s\n"
END

View file

@ -0,0 +1,20 @@
LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Visar eller ändrar filattributen.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] fil ...\n\
[/S [/D]]\n\n\
+ Sätter ett attribut\n\
- Rensar ett attribut\n\
R Attribut: Skrivskyddad.\n\
A Attribut: Arkiverad.\n\
S Attribut: System.\n\
H Attribut: Dold.\n\
/S Behandlar matchande filer i den aktuella mappen\n\
och alla undermappar.\n\
/D Bearbetar även mappar.\n\n\
Skriv ATTRIB utan parametrar för att visa attributten för alla filer.\n"
STRING_CONSOLE_ERROR "Okänt fel: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Ogiltigt parameterformat - %s\n"
END

View file

@ -0,0 +1,22 @@
/* TRANSLATOR: 2015 Erdem Ersoy (eersoy93) (erdemersoy [at] erdemersoy [dot] net) */
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Kütük öz niteliklerini görüntüler ya da değiştirir.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] kütük ...\n\
[/S [/D]]\n\n\
+ Bir öz nitelik ayarlar\n\
- Bir öz nitelik siler\n\
R Yalnızca okunur kütük öz niteliği\n\
A Belgelik kütük öz niteliği\n\
S Dizge kütük öz niteliği\n\
H Gizli kütük öz niteliği\n\
/S Şimdiki dizindeki ve tüm alt dizinlerdeki kütükleri eşlemeyi yapar\n\
/D Dizinleri de yap\n\n\
Tüm kütüklerin öz niteliklerini görüntülemek için bir değişken olmadan ATTRIB\n\
yazınız.\n"
STRING_CONSOLE_ERROR "Bilinmeyen yanlışlık: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Geçersiz değişken biçimi - %s\n"
END

View file

@ -0,0 +1,28 @@
/*
* PROJECT: Command-line interface
* LICENSE: GPL - See COPYING in the top level directory
* FILE: base/shell/cmd/lang/uk-UA.rc
* PURPOSE: Ukraianian Language File for Command-line interface
* TRANSLATORS: Artem Reznikov, Igor Paliychuk
*/
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "Відображення або зміна атрибутів файлу.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] файл ...\n\
[/S [/D]]\n\n\
+ Встановлення атрибуту\n\
- Зняття атрибуту\n\
R Атрибут файлу ""Лише читання""\n\
A Атрибут файлу ""Архiвний""\n\
S Атрибут файлу ""Системний""\n\
H Атрибут файлу ""Прихований""\n\
/S Обробка файлiв зi вказаними iменами в поточнiй тецi\n\
i у всіх її пiдтеках\n\
/D Обробка також i тек\n\n\
Введiть ATTRIB без параметра, щоб вивести атрибути всiх файлiв.\n"
STRING_CONSOLE_ERROR "Невiдома помилка: %d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "Невiрний формат параметра - %s\n"
END

View file

@ -0,0 +1,21 @@
/* Simplified Chinese translation by Song Fuchang (0xfc) <sfc_0@yahoo.com.cn> 2011 */
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "显示或更改文件属性。\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] 文件 ...\n\
[/S [/D]]\n\n\
+ 设置一个属性\n\
- 清除一个属性\n\
R 只读属性\n\
A 归档属性\n\
S 系统属性\n\
H 隐藏属性\n\
/S 处理当前目录和所有子目录下的所有匹配文件\n\
/D 同时处理目录\n\n\
执行不带参数的 ATTRIB 将会显示所有文件的属性。\n"
STRING_CONSOLE_ERROR "未知错误:%d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "无效的参数格式 - %s\n"
END

View file

@ -0,0 +1,22 @@
/* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2@hotmail.com) */
/* Improved by Luo Yufan 2019 <njlyf2011@hotmail.com> */
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
STRINGTABLE
BEGIN
STRING_ATTRIB_HELP "顯示或更改檔案屬性。\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] 檔案 ...\n\
[/S [/D]]\n\n\
+ 設定一個屬性\n\
- 清除一個屬性\n\
R 只讀屬性\n\
A 歸檔屬性\n\
S 系統屬性\n\
H 隱藏屬性\n\
/S 處理當前目錄和所有子目錄下的所有匹配檔案\n\
/D 同時處理目錄\n\n\
執行不帶參數的 ATTRIB 將會顯示所有檔案的屬性。\n"
STRING_CONSOLE_ERROR "未知錯誤:%d\n"
STRING_ERROR_INVALID_PARAM_FORMAT "無效的參數格式 - %s\n"
END

View file

@ -0,0 +1,7 @@
#pragma once
#define RC_STRING_MAX_SIZE 3072
#define STRING_ERROR_INVALID_PARAM_FORMAT 107
#define STRING_CONSOLE_ERROR 316
#define STRING_ATTRIB_HELP 600