Протокол передачи файлов (FTP) — это интернет-стандарт для загрузки и выгрузки файлов с / на серверы, на которых размещаются репозитории данных. Современные операционные системы включают программное обеспечение клиента FTP командной строки в своих заводских конфигурациях. Вы можете использовать командную строку на своем компьютере, чтобы отправить локальный файл на удаленный сервер, расположенный по известному IP-адресу.
Как отправить файл на IP-адрес с помощью командной строки: BrianAJackson / iStock / Getty Images
Шаг 1
Нажмите «Пуск» и введите «запустить» в поле поиска. Нажмите на ссылку «Выполнить», затем введите «cmd» и нажмите «Enter». Нажмите на новое окно, чтобы выбрать его.
Шаг 2
Измените текущий каталог командной строки на папку, содержащую файл, который вы хотите отправить, введя следующую команду:
cd » myFiles projectA»
Замените « myFiles projectA» на полный путь к папке, содержащей файл. Нажмите Ввод.»
Шаг 3
Введите следующую команду, чтобы запустить клиент командной строки в командной строке:
ftp 74.120.4.80
Замените «74.120.4.80» IP-адресом компьютера, на который вы хотите отправить файл. Нажмите Ввод.» FTP-клиент будет ждать вашей следующей команды в собственной командной строке.
Шаг 4
Введите следующую команду:
положить myFile.doc
Замените «myFile.doc» на имя файла, который вы хотите отправить. Нажмите Ввод.» После задержки, которая зависит от размера файла, клиент FTP вернет вам управление. В этот момент файл будет успешно отправлен на удаленный IP-адрес.
Шаг 5
Введите следующую команду:
до свидания
Нажмите Ввод.» FTP-клиент выйдет в обычную командную строку.
Продолжаем тему работы с FTP сервером! Мы уже рассмотрели основы протокола FTP, а так же способы работы с FTP сервером, а сегодня мы рассмотрим работу с FTP сервером через командную строку cmd. Как я и говорил данный метод используется довольно редко, по крайней мере мной, так как проще работать через FTP клиент. Однако, для написания автоматизированных скриптов для обмена данными между вашей локальной машиной и FTP сервером эти знания вам очень даже пригодятся.
В данном видео писать скрипт мы не будем, этим мы займемся в следующем видео, а просто рассмотрим основные команды для работы с FTP сервером через командную строку.
И для начала нам необходимо запустить командную строку (Пуск Приложения Служебные программы Командная строка) или Win+R cmd.
Первым делом необходимо перейти в режим работы с FTP сервером делается это через команду FTP
Далее необходимо подключиться непосредственно к серверу, с которым мы будем работать, делается это через команду OPEN АДРЕС_FTP_СЕРВЕРА
Вводим ИМЯ_ПОЛЬЗОВАТЕЛЯ который имеет доступ к данному серверу и ПАРОЛЬ
Если мы ведем команду DIR то нам выведется список файлов и папок которые содержатся на FTP сервере.
Я не буду рассказывать о всех командах, которые используются для работы с FTP сервером через командную строку, а только те, которые нам понадобится для написания скрипта. Главным образом это команды, позволяющие копировать файлы с FTP-сервера на наш локальный компьютер и наоборот с локального компьютера на FTP-сервер.
Вы всегда можете набрать команду HELP и вам выведется список поддерживаемых команд, чтобы узнать назначение команды достаточно ввести HELP НАЗВАНИЕ_КОМАНДЫ.
Но, тут описание очень скромное, поэтому, если вы хотите узнать более подробное описание различных команд, заходите ко мне на сайт в тематическую статью. Ссылку я размещу в описании к данному видео.
У меня нет доступа для непосредственно записи файлов в корень данного FTP-сервера, но есть доступ к папке htdocs, поэтому для начала перейдём в данную папку. Делается это команды CD ИМЯ_ПАПКИ.
Мы видим, что в данной папке у нас ничего нет. Давайте попробуем скопирую сюда какой-нибудь файл с нашего локального компьютера. Для этого на локальном компьютере создадим папочку, допустим у меня это будет nod32_update так как в одном из следующих видео, я буду рассказывать о том, как написать скрипт для автоматического обновления антивируса NOD32. И давайте создадим какой-нибудь текстовый документ допустимым 123.txt.
Чтобы скопировать файл 123.txt на FTP-сервер вводим команду PUT c:nod32_update123.txt. Файл скопирован, можем проверить это командой DIR. Как вы видите, файл скопировался именно в ту папку, в которую мы перешли через команду CD.
Если нам необходимо скопировать все файлы с определенной папки на локальном компьютере в папку на FTP сервере, то нам необходимо указать текущий локальный каталог и каталог на сервере.
Каталог на сервере мы научились указывать, через команду CD
Локальный каталог указывается через команду LCD, если мы её наберем, то увидим, что текущий каталог — это папка с профилем текущего пользователя. А так как я собираюсь копировать файлы из другой папки то ввожу команду LCD ПУТЬ_К_НУЖНОЙ_ПАПКЕ
В чем суть, есть команда MPUT которая копирует файлы из локальной папки на удаленную и она не запрашивает какие именно это папки, поэтому нам эту информацию нужно сообщить.
Для того, чтобы скопировать все файлы из локальной папки в удаленную я указываю команду MPUT *.*, где *.* означает все файлы находящиеся в локальной папке.
Здесь у нас задаётся вопрос подтверждение для каждого файла хотим его скопировать или нет для этого живём Enter. Чтобы подобные подтверждение не выводились есть команда PROMT отключает интерактивный режим выключен.
Теперь попробуем сделать обратное действие, а именно скопировать все файлы с удаленной папки на FTP сервере в локальную. Делается это через команду MGET *.*.
Как видите всё отлично, в нашей папке появились все необходимые файлы и теперь мы можем закончить работу с FTP сервером через команду QUIT.
Download Article
Download Article
Net Send is a command line tool used in Windows XP for sending messages to other users and computers on a local network. With Windows Vista, Net Send was replaced with msg.exe, a command line tool that has very similar functionality and syntax. Net Send cannot send messages from a Windows XP machine to a machine using a later version of Windows.
-
1
Open the Command Prompt. You can use the net send command to send messages to other computers on your network.[1]
The command is used through the Command Prompt. You can open the Command Prompt from the Start menu or by pressing ⊞ Win+R and typing «cmd».- If you are using Windows Vista, 7, 8, 8.1, or 10, see the next section. The net send command was discontinued starting with Windows Vista, and replaced with a similar msg command.
-
2
Start the command. Type net send and press space. You’ll be adding information to the end of the command to specify where the message goes and what it says.[2]
Advertisement
-
3
Define who you are sending the message to. There are several different ways you can address the message to someone specific or to an entire group:[3]
- net send name — You can enter a username or computer name on your network to send the message to someone specific. If there is a space in the name, surround the name in quotes (e.g. net send "John Doe").
- net send * — This will send the message to all of the users on your current domain or workgroup.
- net send /domain:name — This will send the message to everyone in the specified domain or workgroup.
- net send /users — This will send the message to all of the users currently connected to the server.
-
4
Add the message. Type out the message that you want to send after you’ve specified the recipient(s).[4]
Your message can be up to 128 characters.- For example — net send "John Doe" Let's meet up in 10 minutes.
-
5
Send the message. Once you’re finished typing the message, press ↵ Enter to send it.[5]
The recipient will receive the message in a Windows dialog box, as long as they are logged in and connected to the network.
Advertisement
-
1
Check if your version of Windows supports the msg command. The msg command replaces a lot of the functionality of the discontinued net send command. Unfortunately, the msg command is limited to the Professional and Enterprise editions of Windows. If you are using a Home edition, you’ll need to upgrade to Professional or Enterprise in order to use the msg command.[6]
- You can see what version of Windows you’re running by pressing ⊞ Win+Pause, or by right-clicking «Computer» and selecting «Properties». Your version of Windows will be listed under the «Windows edition» section.
-
2
Open the Command Prompt. Like net send, the msg command is run from the Command Prompt. There are several ways you can open it, depending on the version of Windows you are using, or you can press ⊞ Win and type «cmd».
- Windows Vista and 7 — Open the Command Prompt from the Start menu.
- Windows 8.1, and 10 — Right-click the Start button and select «Command Prompt».
- Windows 8 — Press ⊞ Win+X and select «Command Prompt».
-
3
Start the command. Type msg and press Space. You’ll be adding routing information as well as the message itself to the end of the command.
-
4
Define who you are sending the message to. The msg command has some different routing options than the old net send command:[7]
- msg username — Enter a username on your network to send a message to that user.
- msg session — Enter the name of a specific session that you want to send the message to.
- msg sessionID — Enter the number of the specific session that you want to send the message to.
- msg @filename — Enter the name of the file that contains a list of usernames, sessions, and/or session IDs that you want to send the message to. Useful for department lists.
- msg * — This will send the message to everyone on the server.
-
5
Define the server you want to check for recipients on (optional). If you want to send the message to someone on a different server, enter the server information after the recipient information. If you don’t specify a server, the message will be sent on the current server.
- msg * /server:servername
-
6
Set a time limit (optional). You can add a time limit to your message if it is time sensitive. The time is indicated in seconds. The time limit modifier comes after the server information (if present).
- msg * /time:seconds (e.g. 300 seconds for a five minute time limit)
-
7
Add your message. Once you’ve set all of your options, you can add your message to the end of the command. You can also press ↵ Enter without entering a message, and you’ll be prompted to type it on a separate line.
- For example msg @salesteam /server:EASTBRANCH /time:600 Congrats everyone on exceeding your sales goal this quarter!
-
8
Send the message. Press ↵ Enter to send the message. The other users should receive it immediately.
- The msg command is designed to send messages to terminal users, not necessarily to different Windows computers on the same network.
-
9
Troubleshoot errors. There are a couple of different errors you may encounter when using the msg command:[8]
- ‘msg’ is not recognized as an internal or external command, operable program or batch file. — If you receive this message, you are not running a version of Windows that supports msg. You’ll need to upgrade to the Professional edition to access the command.
- Error 5 getting session names or Error 1825 getting session names — There was a problem communicating with the recipient. Some users have fixed this problem by opening the Registry Editor on the recipient’s computer (Run «regedit» to open it), navigating to «HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server», and changing «AllowRemoteRPC» from «0» to «1».
Advertisement
Add New Question
-
Question
It says access denied. Why?
The reason that access denied is showing is because either the device you are trying to connect to has rejected your connection or you are not running CMD under administrator.
-
Question
How do I send messages using windows 10?
Net Send is not supported on Windows 10. However, there are other messaging services on the internet.
-
Question
How do I change the value of «AllowRemoteRPC» from 0 to 1?
Hold WINDOWS + R. Type in «regedit» (without quotation marks). Using the file tree on the left, navigate to «HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server» and find «AllowRemoteRPC». Right-click and click Modify, then change the current value to 1 if it isn’t already.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
About This Article
Article SummaryX
1. Right-click the Start menu.
2. Click Command prompt.
3. Type «msg USERNAME /server:SERVERNAME» and press Enter.
4. Type your message.
5. Press Enter to send.
Did this summary help you?
Thanks to all authors for creating a page that has been read 897,954 times.
Is this article up to date?
Download Article
Download Article
Net Send is a command line tool used in Windows XP for sending messages to other users and computers on a local network. With Windows Vista, Net Send was replaced with msg.exe, a command line tool that has very similar functionality and syntax. Net Send cannot send messages from a Windows XP machine to a machine using a later version of Windows.
-
1
Open the Command Prompt. You can use the net send command to send messages to other computers on your network.[1]
The command is used through the Command Prompt. You can open the Command Prompt from the Start menu or by pressing ⊞ Win+R and typing «cmd».- If you are using Windows Vista, 7, 8, 8.1, or 10, see the next section. The net send command was discontinued starting with Windows Vista, and replaced with a similar msg command.
-
2
Start the command. Type net send and press space. You’ll be adding information to the end of the command to specify where the message goes and what it says.[2]
Advertisement
-
3
Define who you are sending the message to. There are several different ways you can address the message to someone specific or to an entire group:[3]
- net send name — You can enter a username or computer name on your network to send the message to someone specific. If there is a space in the name, surround the name in quotes (e.g. net send "John Doe").
- net send * — This will send the message to all of the users on your current domain or workgroup.
- net send /domain:name — This will send the message to everyone in the specified domain or workgroup.
- net send /users — This will send the message to all of the users currently connected to the server.
-
4
Add the message. Type out the message that you want to send after you’ve specified the recipient(s).[4]
Your message can be up to 128 characters.- For example — net send "John Doe" Let's meet up in 10 minutes.
-
5
Send the message. Once you’re finished typing the message, press ↵ Enter to send it.[5]
The recipient will receive the message in a Windows dialog box, as long as they are logged in and connected to the network.
Advertisement
-
1
Check if your version of Windows supports the msg command. The msg command replaces a lot of the functionality of the discontinued net send command. Unfortunately, the msg command is limited to the Professional and Enterprise editions of Windows. If you are using a Home edition, you’ll need to upgrade to Professional or Enterprise in order to use the msg command.[6]
- You can see what version of Windows you’re running by pressing ⊞ Win+Pause, or by right-clicking «Computer» and selecting «Properties». Your version of Windows will be listed under the «Windows edition» section.
-
2
Open the Command Prompt. Like net send, the msg command is run from the Command Prompt. There are several ways you can open it, depending on the version of Windows you are using, or you can press ⊞ Win and type «cmd».
- Windows Vista and 7 — Open the Command Prompt from the Start menu.
- Windows 8.1, and 10 — Right-click the Start button and select «Command Prompt».
- Windows 8 — Press ⊞ Win+X and select «Command Prompt».
-
3
Start the command. Type msg and press Space. You’ll be adding routing information as well as the message itself to the end of the command.
-
4
Define who you are sending the message to. The msg command has some different routing options than the old net send command:[7]
- msg username — Enter a username on your network to send a message to that user.
- msg session — Enter the name of a specific session that you want to send the message to.
- msg sessionID — Enter the number of the specific session that you want to send the message to.
- msg @filename — Enter the name of the file that contains a list of usernames, sessions, and/or session IDs that you want to send the message to. Useful for department lists.
- msg * — This will send the message to everyone on the server.
-
5
Define the server you want to check for recipients on (optional). If you want to send the message to someone on a different server, enter the server information after the recipient information. If you don’t specify a server, the message will be sent on the current server.
- msg * /server:servername
-
6
Set a time limit (optional). You can add a time limit to your message if it is time sensitive. The time is indicated in seconds. The time limit modifier comes after the server information (if present).
- msg * /time:seconds (e.g. 300 seconds for a five minute time limit)
-
7
Add your message. Once you’ve set all of your options, you can add your message to the end of the command. You can also press ↵ Enter without entering a message, and you’ll be prompted to type it on a separate line.
- For example msg @salesteam /server:EASTBRANCH /time:600 Congrats everyone on exceeding your sales goal this quarter!
-
8
Send the message. Press ↵ Enter to send the message. The other users should receive it immediately.
- The msg command is designed to send messages to terminal users, not necessarily to different Windows computers on the same network.
-
9
Troubleshoot errors. There are a couple of different errors you may encounter when using the msg command:[8]
- ‘msg’ is not recognized as an internal or external command, operable program or batch file. — If you receive this message, you are not running a version of Windows that supports msg. You’ll need to upgrade to the Professional edition to access the command.
- Error 5 getting session names or Error 1825 getting session names — There was a problem communicating with the recipient. Some users have fixed this problem by opening the Registry Editor on the recipient’s computer (Run «regedit» to open it), navigating to «HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server», and changing «AllowRemoteRPC» from «0» to «1».
Advertisement
Add New Question
-
Question
It says access denied. Why?
The reason that access denied is showing is because either the device you are trying to connect to has rejected your connection or you are not running CMD under administrator.
-
Question
How do I send messages using windows 10?
Net Send is not supported on Windows 10. However, there are other messaging services on the internet.
-
Question
How do I change the value of «AllowRemoteRPC» from 0 to 1?
Hold WINDOWS + R. Type in «regedit» (without quotation marks). Using the file tree on the left, navigate to «HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server» and find «AllowRemoteRPC». Right-click and click Modify, then change the current value to 1 if it isn’t already.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
About This Article
Article SummaryX
1. Right-click the Start menu.
2. Click Command prompt.
3. Type «msg USERNAME /server:SERVERNAME» and press Enter.
4. Type your message.
5. Press Enter to send.
Did this summary help you?
Thanks to all authors for creating a page that has been read 897,954 times.
Is this article up to date?
Загрузить PDF
Загрузить PDF
Net Send – это утилита командной строки, которая используется в Windows XP для отправки сообщений другим пользователям и компьютерам, подключенным к локальной сети. В Windows Vista утилита Net Send заменена утилитой msg.exe с похожей функциональностью и синтаксисом. Net Send не сможет отправить сообщения с компьютера под управлением Windows XP на компьютер под управлением более новой версии Windows.
-
1
Откройте командную строку. Утилита net send используется для отправки сообщений на другие сетевые компьютеры. Она запускается из командной строки. Откройте командную строку из меню «Пуск» или нажмите ⊞ Win+R и введите cmd.
- Если вы работаете в Windows Vista/7/8/8.1/10, перейдите в следующий раздел. Утилита net send не используется в новых версиях Windows (начиная с Vista) и заменена утилитой msg.
-
2
Введите команду. Введите net send и нажмите Пробел. Далее нужно ввести информацию, которая содержит текст и направление сообщения.
-
3
Определите получателя сообщения. Сообщение можно отправить как одному пользователю, так и группе пользователей; это делается несколькими способами.[1]
- net send имя – введите имя пользователя или сетевое имя компьютера, чтобы отправить сообщение конкретному пользователю. Если в имени есть пробел, оно заключается в кавычки (например, net send "Ivan Ivanov").
- net send * – сообщение будет отправлено всем пользователям текущего домена или рабочей группы.
- net send /domain:имя – сообщение будет отправлено всем пользователям указанного домена или рабочей группы.
- net send /users – сообщение будет отправлено всем пользователям, которые подключены к серверу.
-
4
Введите текст сообщения. Указав получателя(ей), введите текст сообщения. Оно должно быть не более 128 символов.
- Например: net send "Ivan Ivanov" Давай встретимся через 10 минут.
-
5
Отправьте сообщение. Закончив вводить сообщение, нажмите ↵ Enter, чтобы отправить его. Получатель увидит сообщение в диалоговом окне Windows (но только если он вошел в систему и подключен к сети).
Реклама
-
1
Проверьте, поддерживает ли система команду msg. Функционал этой команды во многом аналогичен функционалу неиспользуемой команды net send. Но эта команда работает только в профессиональной и корпоративной версиях Windows. Если вы работаете в Windows Домашняя, обновите систему до версии Профессиональная или Корпоративная, чтобы получить возможность пользоваться командой msg.[2]
- Чтобы узнать версию Windows, нажмите ⊞ Win+Pause или щелкните правой кнопкой мыши по «Компьютер» и выберите «Свойства». Версия Windows отобразится в разделе «Издание Windows».
-
2
Откройте командную строку. Как и net send, команда msg запускается из командной строки. Командная строка запускается разными способами (в зависимости от версии Windows), или просто нажмите ⊞ Win и введите cmd.
- Windows Vista/7: откройте командную строку из меню «Пуск».
- Windows 8.1/10: щелкните правой кнопкой мыши по кнопке «Пуск» и выберите «Командная строка».
- Windows 8: нажмите ⊞ Win+X и выберите «Командная строка».
-
3
Введите команду. Введите msg и нажмите Пробел. Далее нужно ввести информацию, которая содержит текст и направление сообщения.
-
4
Определите получателя сообщения. По сравнению с net send, команда msg обладает дополнительными опциями.[3]
- msg имя пользователя – введите имя конкретного пользователя.
- msg сеанс – введите имя конкретного сеанса.
- msg ID сеанса – введите идентификатор конкретного сеанса.
- msg @filename – введите имя файла, который содержит список имен пользователей, сеансов и/или идентификаторов сеансов. Полезно для отправки сообщений сотрудникам отделов.
- msg * – сообщение будет отправлено всем пользователям, которые подключены к серверу.
-
5
Укажите сервер, пользователям которого нужно отправить сообщение (если хотите). Если нужно отправить сообщение пользователю, который подключен к другому серверу, после информации о получателе введите информацию о сервере. Если сервер не указан, сообщение будет отправлено на текущий сервер.
- msg * /server:имя сервера
-
6
Задайте ограничение по времени (если хотите). Можно задать ограничение по времени, чтобы указать интервал ожидания подтверждения от получателя. Временной модификатор вводится после информации о сервере (если она есть).
- msg * /time:секунды (например, 300 секунд для пятиминутного интервала)
-
7
Введите текст сообщения. После ввода различных параметров введите текст сообщения. Или нажмите ↵ Enter, и система предложит ввести текст сообщения в отдельной строке.
- Например: msg @salesteam /server:EASTBRANCH /time:600 Поздравляю с увеличением продаж в этом квартале!
-
8
Отправьте сообщение. Для этого нажмите ↵ Enter. Адресат получит его немедленно.
- Команда msg предназначена для отправки сообщений пользователям терминалов, а не только разным компьютерам, подключенным к одной сети.
-
9
Устраните неполадки. При работе с msg можно столкнуться со следующими ошибками: [4]
- ‘msg’ is not recognized as an internal or external command, operable program or batch file. (msg не распознается в качестве внутренней или внешней команды, исполняемой программы или пакетного файла). В этом случае версия Windows не поддерживает msg. Обновите Windows до версии Профессиональная.
- Error 5 getting session names (Ошибка 5 получение имен сеансов) или Error 1825 getting session names (Ошибка 1825 получение имен сеансов). Ошибка при общении с получателем. Можно попытаться устранить такую неполадку, если на компьютере получателя открыть редактор реестра (для этого выполните команду regedit), перейти в HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server и изменить значение параметра «AllowRemoteRPC» с 0 на 1.
Реклама
Об этой статье
Эту страницу просматривали 69 454 раза.