Metadata-Version: 2.1
Name: FolderProcessing
Version: 0.0.9
Summary: 一个基于其他模块，快速执行文件夹处理的模块|A module that quickly performs folder processing based on other modules
Home-page: https://codechina.csdn.net/qq_53280175/folderprocessing
Author: PYmili
Author-email: mc2005wj@163.com
Maintainer: PYmili
Maintainer-email: mc2005wj@163.com
License: MIT License
Platform: UNKNOWN
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# FolderProcessing 文件夹处理包 | Folderprocessing folder processing package


使用方法在作者的第三方仓库中，可以自行查看


The usage method is in the author's third-party warehouse and can be used by yourself

[codechina.csdn 教程链接|Tutorial links](https://blog.csdn.net/qq_53280175?spm=1000.2115.3001.5343)


# 联系方式即使用方法


用于查看指定目录下的所有文件 列表形式输出


Used to view the list output of all files in the specified directory



**联系方式**--QQ:2097632843---邮件：mc2005wj@163.com


---------------------------------------------------------------


**使用方式**



仅为个人程序，已发布到pypi



可 pip install FolderProcessing 进行安装


view函数使用方法：



导入库: from FolderProcessing import view 或 from FolderProcessing import *



`from FolderProcessing import view`


`view.OsList("文件路径")`



————————————————————————————————————————————————————————————————————————————————————————————————



new函数使用方法：



导入库：from FolderProcessing import new 或 from FolderProcessing import *



`from FolderProcessing import new`


`new.new('命令', '位置', '文件名', '数量', '后缀名')`



——————————————————————————————————————————————————————————————————————————————————————————————————————————————



new函数中的 命令 (command) 命令列表

| 函数名称 | 命令 |
| ------ | ------ |
| new | new('n', '位置', '文件名', '数量) new('n_file', '位置', '文件名', '数量', '后缀名') |
| new_del | new_del('del', '文件路径及名字') new_del('del_folder', '文件路径及名字') |
| new_input | new_input('文件路径及名字', '需要输入到文件的内容') |
| new_print | new_print('文件路径') |
| new_add | new_add('文件路径及名字', '需要输入到文件的内容') |
| filename | filenname('文件路径及名字', '需要更改文件名字及后缀名') |  
| move | move('要移动的文件路径', '要移动至的文件路径') | 
| copy | copy('file', '路径即文件名字', '要复制至的文件名字') copy('copy', '要移动的文件名字', '要移动至的文件路径')|
| copy | copy('tree', '要复制的文件夹名字', '新建一个复制进去/文件夹位置', '数量') |

openfile函数
导入from FolderProcessing import openfile
class openfile(name, file, cmd, coding, message='')
op = openfile(name, file, cmd, coding, message='')
op.fileopen()#打开一个文件输入内容内容为message=''，变量名为name，file是文件路径,cmd输入help即可知道使用方法,coding为编码格式
#cmd 与 python 函数open()打开方式一致
op.read()#获取文件信息，输出
op.readlines()#获取文件信息，输出列表
op.readline()#获取文件信息，一行一行输出


提示：如果源文件是文件夹。输入更改名字不带后缀名将不会更改文件夹，依旧是文件夹但是更改了名字。如果带了后缀名将会把文件更改为文件不是文件夹



如果文件夹中有文件将会报错不会更改！



示例：“n_file” `new.new('n_file', 'C:\\Windows\\', 'test', '1', '.py')` 
“n” 
`new.new('n', 'C:\\Windows\\', 'test', '1')`



版本：0.0.8


#Contact information is the method of use


Used to view the list output of all files in the specified directory


Used to view the list output of all files in the specified directory


**Contact information * * -- QQ: 2097632843 --- email: mc2005wj@163.com



---------------------------------------------------------------


**Mode of use**


Personal program only, published to pypi


It can be installed by PIP install FolderProcessing


How to use the view function:


Import library: from FolderProcessing import view or from FolderProcessing import *


`from FolderProcessing import view`


`view. Oslist ("file path")`


————————————————————————————————————————————————————————————————————————————————————————————————


How to use the new function:


Import library: from FolderProcessing import new or from FolderProcessing import *


`from FolderProcessing import new`


`new. new ('command', 'location', 'name', 'number', 'suffix')`


——————————————————————————————————————————————————————————————————————————————————————————————————————————————


List of commands in the new function


| Function name | command |
| ------ | ------ |
|new | new('n', 'location', 'file name', 'quantity) new('n_File', 'location', 'file name', 'quantity', 'suffix') |
| new_del | new_ Del('del', 'file path and name') new_ del('del_folder', 'file path and name') |
| new_input | new_input('File path and name', 'content to be input into the file') |
| new_print | new_print('File path') |
| new_app | new_app('File path and name', 'content to be entered into the file') |
|filename | filenname('file path and name', 'file name and suffix need to be changed') |
|move | move ('File path to move', 'file path to move')|
|copy | copy ('File', 'path is file name', 'file name to copy to') copy('copy', 'file name to move', 'file path to move to')|
|copy | copy ('tree', 'name of folder to be copied', 'new copy in / folder location', 'quantity')|


Communications

Incoming from FolderProcessing import openfile

Class openfile(name, file, cmd, coding, message=')

op = openfile(name, file, cmd, coding, message=')

op.fileopen()#opening a document entry content content as message=', changing name, file path, cmd input help can be known using methods, coding as encoding format

#cmd in conjunction with python communications open()

op.read()#Get Document information, import

op.readlines()#Get Document Information, Translate List

op.readline()#Get Document Information, transmitting one


Tip: if the source file is a folder. Entering a name without a suffix will not change the folder. It is still a folder, but the name has been changed. If the suffix is used, the file will be changed to a file instead of a folder


If there are files in the folder, an error will be reported and will not be changed!


Example: "n"_ file”


`new.new('n_file', 'C:\\Windows\\', 'test', '1', '.py')` 


Example:”n“ 


`new.new('n', 'C:\\Windows\\', 'test', '1')`


Version: 0.0.9


