Using php to rename a file migration first shows that this is a sad story.
During the summer vacation, the school arranged for us to go to a software outsourcing company for an internship. it is very convenient to think about it without an interview. you can take this opportunity to learn from Daniel, although there is no salary (it is said that the school still pays 600 yuan of insurance), it is still expected to think about it, but the company will be forced to do so ~ No technicians are there, okay! Jobs have been arranged. what human resources, business management, financial management, and so on are trained, but no code is written!
I have been assigned to the business management department. every day, I contact various contract approvals, contract scanning, contract stamp, contracts... in short, it is far more complex than learning about contracts. I think it would be a bit hard for me to deal with repetitive and boring jobs without our company.
I have encountered such a problem. The company contract text must be scanned on the computer before being archived and uploaded to the company system. All scanned contracts exist in a folder.
"CDNs annual copy monthly copy Contract No."For example, the tenth contract name for the 15th year of July is" cd1507010.pdf ". There are about 300 contracts each month. To upload data to the system, you can upload the data to the system in one copy, or rename the data locally and send it to the system. Manual operations take more than an hour. Such repetitive and boring work is just a crash. For the first method, because I do not understand the system, I did not do more in-depth research, I focus on the second method. The local renaming rule isPlace the original PDF file under the folder "file name + C" and rename it htwb.pdf.
I want to solve the problem with my php language based on the principle that I should try to hand over my work to the computer. (I don't know if other languages are more efficient, but this is obviously more efficient than manual ).
The company's computer is configured as win7. although it is a software company, the computer level of non-R & D departments is no different from that of General companies. Taking into account the computer knowledge of the operator and the convenience of implementation, I did not install the Apache server or even start the IIS that comes with Windows, and directly usedCommand line.
The script named htzy. php is as follows:
Place the file in the folder to be processed, open the command line window in the folder, and enter
php -f htzy.php
Wait a few seconds.
Simple use of mkdir () rename () function to complete file transfer, and finally use unlink to delete the script. therefore, to reuse this script, you need to save it ~
Now, the file migration is renamed.
Knowledge is power ~