20251021
This commit is contained in:
1 parent
ba6f6b413a
commit
a10492f0ad
6 files changed
+1705
-151
No files matched your search
+9
-33
@@ -114,40 +114,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "11ff2c59-5815-42c9-abaf-71c8c2a3b7da",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os,sys,shutil\n",
|
||||
"from pathlib import Path\n",
|
||||
"\n",
|
||||
"fi_path = 'file/北海/未参加体测人员报告'\n",
|
||||
"new_path = 'file/北海/new/未参加体测人员'\n",
|
||||
"pdf_files = list(fi_path.glob('**/*.pdf'))\n",
|
||||
"\n",
|
||||
"for fn in fls:\n",
|
||||
" fi_name =Path(fn).stem.split('-')[0]\n",
|
||||
" code = int(fi_name) \n",
|
||||
" unit_path = Path(new_path,dict1[str(code)]['unit'])\n",
|
||||
" unit_path.mkdir(parents = True, exist_ok = True)\n",
|
||||
" n_name = Path(unit_path,Path(fn).stem+'.pdf')\n",
|
||||
" #if not os.path.exists(n_name):\n",
|
||||
" shutil.copyfile(fn,n_name)\n",
|
||||
" print(fn)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": 3,
|
||||
"id": "62ff063a-5380-4e08-b115-acd967441ca4",
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2025-09-16T02:36:40.592582Z",
|
||||
"iopub.status.busy": "2025-09-16T02:36:40.591749Z",
|
||||
"iopub.status.idle": "2025-09-16T02:36:40.635821Z",
|
||||
"shell.execute_reply": "2025-09-16T02:36:40.635329Z",
|
||||
"shell.execute_reply.started": "2025-09-16T02:36:40.592518Z"
|
||||
"iopub.execute_input": "2025-09-17T00:08:50.471131Z",
|
||||
"iopub.status.busy": "2025-09-17T00:08:50.470548Z",
|
||||
"iopub.status.idle": "2025-09-17T00:08:51.110490Z",
|
||||
"shell.execute_reply": "2025-09-17T00:08:51.109925Z",
|
||||
"shell.execute_reply.started": "2025-09-17T00:08:50.471076Z"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
@@ -155,8 +130,9 @@
|
||||
"import os,sys,shutil\n",
|
||||
"from pathlib import Path\n",
|
||||
"\n",
|
||||
"fi_path =Path('file/北海/未参加体测人员报告')\n",
|
||||
"new_path = 'file/北海/new/未参加体测人员'\n",
|
||||
"fi_path = Path('file/北海/2022年')\n",
|
||||
"new_path = 'file/北海/new/2022年'\n",
|
||||
"pdf_files = list(fi_path.glob('**/*.pdf'))\n",
|
||||
"fls = list(fi_path.glob('**/*.pdf'))\n",
|
||||
"for fn in fls:\n",
|
||||
" fi_name =Path(fn).name\n",
|
||||
|
||||
Reference in new issue
Block a user