Little bat-day1-automatic file upload

Foreword:

Daily server backup files or production equipment and other data files are all stored in the file server for log analysis or production file CSV, pictures, etc. are transferred to the data warehouse for data analysis, especially part of the production data is stored on the PC side of the personal computer , the data is complex and difficult to obtain, and it is basically impossible to manually organize and upload it to the file server. Today I will introduce a bat script for processing files and share it with you.

1. Xiaobai builds a file server in 1 minute

1.1 The method is wrong, and efforts are in vain

If you have never used a file server and let you build a file server, you may encounter the following problems

  1. Xiaobai may not even know what a file server is?

  1. Xiaobai may have heard in class that Windows comes with a file server

  1. According to the construction tutorial for a long time, there are still more or less small problems

  1. Windows built-in file server is not convenient for account permission management

1.2 FileZilla helps complete the construction in 1 minute

To obtain the corresponding installation package, click the link below

Link: https://pan.baidu.com/s/1xneS1HB2eXKCALJ0O799lw

Extraction code: rkni

1.3 Then click the next step to the next step (time-consuming 30S)

After the installation is complete, our users and ftp permissions can be managed automatically.

1.4 ftp access

Enter ftp://10.110.106.37 (file server ip)/ in the address bar of the computer to successfully access the corresponding shared document

2. Automatic upload script writing

1.1 Code

The script is as follows, with comments for each step

@Echo Off
Echo open 10.110.106.37 >ftp.up
@rem 文件服务器ip
Echo sy1>>ftp.up
@rem 用户名,注意用户名后面不能存在空格
Echo 12345678>>ftp.up
@rem 密码,注意密码后面不能存在空格
Echo Cd .\ld >>ftp.up
@rem 上传文件服务器对应目录的ld文件夹下
Echo binary>>ftp.up
Echo put "D:\xsldown\test.txt">>ftp.up
@rem 本地电脑文件路径
Echo bye>>ftp.up
FTP -s:ftp.up
del ftp.up /q
:Pause
@rem 如果是调试,可以将:Pause改成Pause即可看到整个执行过程

The bat script is as shown above, if you can’t understand it, you can just copy it directly, and just modify the position that is different from the blogger’s.

1.2 Effect

Last file PC or server address

Effects in the file server

If you have any questions, please leave a message to discuss~

Guess you like

Origin blog.csdn.net/qq_29061315/article/details/129091180