|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『楼 主』:
提取文本中每行的第一个 TAB 位前的字符(文件)并拷贝
使用 LLM 解释/回答一下
myfile.txt 文本内容如下
.
.
C:\Program Files\InstallShield Installation Information\{EFB21DE7-8C19-4A88-BB28-A766E16493BC}\data1.cab 1,886KB A 2004-6-16 9:44:50
C:\Program Files\Common Files\InstallShield 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional\RunTime 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701\Intel32 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701\Intel32\ctor.dll 58KB A 2002-12-2 13:33:04
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701\Intel32\iuser.dll 156KB A 2002-12-5 14:10:32
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701\Intel32\setup.dll 283KB A 2007-6-20 19:17:16
C:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs 26KB A 2002-12-2 15:28:58
C:\Program Files\Common Files\InstallShield\Professional\RunTime\IsProBE.tlb 86KB A 2002-12-2 13:23:16
C:\Program Files\Common Files\InstallShield\Professional\RunTime\Objectps.dll 33KB A 2002-12-2 13:33:04
C:\Program Files\Common Files\Adobe\PDFL 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\Adobe\PDFL\6.0 1KB D 1601-1-1 8:00:00
+++++++++++++++++++++++++++++++++++++++++++++++++++++
如下:
C:\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt ->D:\文件提取目录\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt
+++++++++++++++++++++++++++++++++++++++++++++++++++++
Last edited by beyoungse on 2007-6-20 at 09:27 PM ]
myfile.txt 文本内容如下
.
.
C:\Program Files\InstallShield Installation Information\{EFB21DE7-8C19-4A88-BB28-A766E16493BC}\data1.cab 1,886KB A 2004-6-16 9:44:50
C:\Program Files\Common Files\InstallShield 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional\RunTime 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701\Intel32 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701\Intel32\ctor.dll 58KB A 2002-12-2 13:33:04
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701\Intel32\iuser.dll 156KB A 2002-12-5 14:10:32
C:\Program Files\Common Files\InstallShield\Professional\RunTime\0701\Intel32\setup.dll 283KB A 2007-6-20 19:17:16
C:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs 26KB A 2002-12-2 15:28:58
C:\Program Files\Common Files\InstallShield\Professional\RunTime\IsProBE.tlb 86KB A 2002-12-2 13:23:16
C:\Program Files\Common Files\InstallShield\Professional\RunTime\Objectps.dll 33KB A 2002-12-2 13:33:04
C:\Program Files\Common Files\Adobe\PDFL 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\Adobe\PDFL\6.0 1KB D 1601-1-1 8:00:00
+++++++++++++++++++++++++++++++++++++++++++++++++++++
如下:
C:\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt ->D:\文件提取目录\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt
+++++++++++++++++++++++++++++++++++++++++++++++++++++
Last edited by beyoungse on 2007-6-20 at 09:27 PM ]
|
|
2007-6-20 16:51 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
如:
MSCAL.DEP 1KB A 1998-4-24
。
。
。
copy MSCAL.DEP d:\test\
For example:
MSCAL.DEP 1KB A 1998-4-24
。
。
。
copy MSCAL.DEP d:\test\
|
|
2007-6-20 16:52 |
|
|
zasxcdfv
初级用户
 
积分 152
发帖 75
注册 2007-2-6
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
for /f "tokens=1,*" %%a in (yourfile.txt) do copy 路径\%%a d:\test\
对于 /f "tokens=1,*" %%a in (yourfile.txt) do copy 路径\%%a d:\test\
|
|
2007-6-20 16:57 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
谢谢你,可以的
努力学习中,
Thank you, it's okay. Studying hard.
|
|
2007-6-20 17:18 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『第 5 楼』:
再进一步操作
使用 LLM 解释/回答一下
如:
C:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs 26KB A 2002-12-2 15:28:58
C:\Program Files\Common Files\InstallShield\Professional\RunTime\IsProBE.tlb 86KB A 2002-12-2 13:23:16
C:\Program Files\Common Files\InstallShield\Professional\RunTime\Objectps.dll 33KB A 2002-12-2 13:33:04
C:\Program Files\Common Files\Adobe\PDFL 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\Adobe\PDFL\6.0 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\90ms-RKSJ-UCS2 113KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\90pv-RKSJ-UCS2 2KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\90pv-RKSJ-UCS2C 103KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-B5pc 8KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-ETen-B5 9KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-H-CID 2KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-H-Host 9KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-H-Mac 8KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-UCS2 262KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-GBK-EUC 94KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-GBpc-EUC 5KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-H-CID 2KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-H-Host 95KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-H-Mac 5KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-UCS2 234KB 2003-4-22 14:57:18
。
。
。
把C盘中的文件相同层次的保存在D盘 目录一并拷贝
C:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs
->D:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs
C:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs 26KB A 2002-12-2 15:28:58
C:\Program Files\Common Files\InstallShield\Professional\RunTime\IsProBE.tlb 86KB A 2002-12-2 13:23:16
C:\Program Files\Common Files\InstallShield\Professional\RunTime\Objectps.dll 33KB A 2002-12-2 13:33:04
C:\Program Files\Common Files\Adobe\PDFL 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\Adobe\PDFL\6.0 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps 1KB D 1601-1-1 8:00:00
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\90ms-RKSJ-UCS2 113KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\90pv-RKSJ-UCS2 2KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\90pv-RKSJ-UCS2C 103KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-B5pc 8KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-ETen-B5 9KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-H-CID 2KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-H-Host 9KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-H-Mac 8KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-CNS1-UCS2 262KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-GBK-EUC 94KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-GBpc-EUC 5KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-H-CID 2KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-H-Host 95KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-H-Mac 5KB 2003-4-22 14:57:18
C:\Program Files\Common Files\Adobe\PDFL\6.0\CMaps\Adobe-GB1-UCS2 234KB 2003-4-22 14:57:18
Copy the files of the same level in the C drive to the D drive directory and copy them together
C:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs
->D:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs
|
|
2007-6-20 19:39 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
“C:\Program Files\Common Files\*.*"
中间有两个空格,不知要怎么搞啦,高手帮忙
“C:\Program Files\Common Files\*.*"
There are two spaces in the middle, I don't know how to fix it, please help, expert!
|
|
2007-6-20 19:57 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
第一个TAB 位前的文件(夹) 怎么表示
How to represent the file/folder before the first TAB position
|
|
2007-6-20 20:00 |
|
|
duanml
中级用户
  
积分 231
发帖 112
注册 2007-6-19
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
这里面每一段空格都是一样长,你把文件里的空格全替换为<tab>符号,拷进excel不就全分开了吗?
或者以空格段为分隔符,导入数据库。
何必要用批处理这么费劲呢?
The spaces in each paragraph here are all the same length. Why not replace all the spaces in the file with <tab> symbols and then copy it into Excel so that it can be separated?
Or use the space segment as a delimiter to import into the database.
Why go to the trouble of using batch processing?
|
|
2007-6-20 20:10 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
我的目的是执行拷贝
把C盘中的文件相同层次的保存在D盘 目录一并拷贝
C:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs
->D:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs
My purpose is to perform a copy. Save the files with the same hierarchy in the C drive to the D drive, and copy the directory as well.
C:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs
->D:\Program Files\Common Files\InstallShield\Professional\RunTime\iKernel.rgs
|
|
2007-6-20 20:19 |
|
|
duanml
中级用户
  
积分 231
发帖 112
注册 2007-6-19
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
导出目标文件后,全部插入xcopy /e。
ultraedit支持单列插入,每一列前全插xcopy,后面插盘符。
或者在excel或者数据库里,前面加一空列,放xcopy,后面空列写盘符。
最后再拷到bat里执行。
After exporting the target file, insert all with xcopy /e.
UltraEdit supports single-column insertion, insert xcopy in front of each column, and insert the drive letter at the back.
Or in Excel or database, add an empty column in front, put xcopy, and write the drive letter in the empty column at the back.
Finally, copy it to the bat for execution.
|
|
2007-6-20 20:28 |
|
|
duanml
中级用户
  
积分 231
发帖 112
注册 2007-6-19
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
一定要用for的话,可以用delims=
重设替换分隔符为那个空格段~
后记
这个方法是错的,dos下的for还不支持字符串作分隔符。
Last edited by duanml on 2007-6-20 at 08:48 PM ]
If you must use for, you can use delims=
Reset the replacement delimiter to that space segment~
Postscript
This method is wrong. The for in DOS does not support string as the delimiter yet.
Last edited by duanml on 2007-6-20 at 08:48 PM ]
|
|
2007-6-20 20:31 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
for /f "delims=1,*" %%a in (file.txt) do xcopy /I /e/s %%a D:\
出错信息如下 ,还有就是" ~~~~~~~~~~~ 809KB 2002-8-6 "会出现
D:\>xcopy /I /e/s C:\Program Files\Common Files\Adobe
TypeSpt\Unicode\Mappings\Win\CP949.TXT 809KB 2002-8-6 D:\
无效的参数数量
D:\>xcopy /I /e/s C:\Program Files\Common Files\Adobe
TypeSpt\Unicode\Mappings\Win\CP950.TXT 523KB 2002-8-6 D:\无效的参数数量
D:\>xcopy /I /e/s C:\WINDOWS\system32\spool\drivers\c
lor\JapanColor200 D:\找不到文件 - JapanColor200
复制了 0 个文件
Last edited by beyoungse on 2007-6-20 at 08:40 PM ]
for /f "delims=1,*" %%a in (file.txt) do xcopy /I /e/s %%a D:\
The error messages are as follows, and also "~~~~~~~~~~~ 809KB 2002-8-6 " will appear
D:\>xcopy /I /e/s C:\Program Files\Common Files\Adobe
TypeSpt\Unicode\Mappings\Win\CP949.TXT 809KB 2002-8-6 D:\
Invalid number of parameters
D:\>xcopy /I /e/s C:\Program Files\Common Files\Adobe
TypeSpt\Unicode\Mappings\Win\CP950.TXT 523KB 2002-8-6 D:\Invalid number of parameters
D:\>xcopy /I /e/s C:\WINDOWS\system32\spool\drivers\c
lor\JapanColor200 D:\File not found - JapanColor200
0 files copied
Last edited by beyoungse on 2007-6-20 at 08:40 PM ]
|
|
2007-6-20 20:33 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
gawk -v sign=\" -F" " "BEGIN{OFS=\"\"}/^C/{print \"copy \",sign,$1,sign,\" \",sign,\"D\"substr($1,2),sign}" yourfile.ext"|more>run.bat
call run.bat
#Gawk 下载
9 楼
http://www.cn-dos.net/forum/viewthread.php?tid=31098
```gawk -v sign=" -F" " "BEGIN{OFS=""}/^C/{print "copy ",sign,$1,sign," ",sign,"D"substr($1,2),sign}" yourfile.ext"|more>run.bat
call run.bat
#Gawk Download
Post 9
http://www.cn-dos.net/forum/viewthread.php?tid=31098```
|
|
2007-6-20 20:39 |
|
|
duanml
中级用户
  
积分 231
发帖 112
注册 2007-6-19
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
是我搞错了,现在dos下的for不支持字符串做分隔符的。
你可以用斑竹的软件,或者我说的ultraedit、excel等的分离后,再列插入的方法。
I made a mistake. Now the for in DOS doesn't support using strings as delimiters.
You can use the administrator's software, or the method I mentioned of separating with UltraEdit, Excel, etc., and then inserting columns.
|
|
2007-6-20 20:46 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
我用lxmxn 班主的也不行,再帮我改一下吧,。
D:\>copy "C:\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt 107KB 2002-10-15 10:24:42
" "D:\Program Files\Common Files\Adobe\TypeSpt\Unicode\Mappings\Adobe\JISX
0208.txt 107KB 2002-10-15 10:24:42 "
系统找不到指定的文件。
再加强一点,目标文件夹在D:\文件提取目录\
C:\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt ->D:\文件提取目录\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt
Last edited by beyoungse on 2007-6-20 at 08:50 PM ]
It doesn't work with the class master of lxmxn either. Let's modify it again.
D:\>copy "C:\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt 107KB 2002-10-15 10:24:42
" "D:\Program Files\Common Files\Adobe\TypeSpt\Unicode\Mappings\Adobe\JISX
0208.txt 107KB 2002-10-15 10:24:42 "
The system cannot find the specified file.
Strengthen it a bit more. The target folder is in D:\File Extraction Directory\
C:\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt ->D:\File Extraction Directory\Program Files\Common Files\Adobe\TypeSpt\
Unicode\Mappings\Adobe\JISX0208.txt
Last edited by beyoungse on 2007-6-20 at 08:50 PM ]
|
|
2007-6-20 20:49 |
|