How to get a list of files name without path, size and datetime.

rem '/b' is short list, '/on' is sort by name, '/a-d' is list all except dir.
dir /b/on/a-d/s > list.txt

How to add string to each of a batch of files name. 

rem add double '@' into the start of each file name with full path and extension.
FOR /R %I IN (*.fnc *.prc *.sql *.bdy *.spc) DO echo @@%~fnxI

for command reference

dos> for /? (part of)

 %~I         - expands %I removing any surrounding quotes (")
 %~fI        - expands %I to a fully qualified path name
 %~dI        - expands %I to a drive letter only
 %~pI        - expands %I to a path only
 %~nI        - expands %I to a file name only
 %~xI        - expands %I to a file extension only

How to rename a bench of files name

FOR /R %I IN (*.*) DO ren *.* *.bak

 

Post a comment

mail.png


相似文章|Related Entries

最近更新|Recent Entries

不定期更新|Handy Entries

相似标签|Related Tags

batch
DOS (2)
DOS
batch (3)

分类栏目|Categories

按月归档|By Month

2008
01
2007
12
10
07
06
05
04
03
02
01
2006
12
11
10
09
08
07
06
05
04
03
02
01
2005
11
10
09
08
07
04
03
2004
12
11
10
09
08
07
06
05
04
03
02
01
2003
12
10
09
08
06
2002
09
08
04
03
02
2001
12
09
07
06
05

站内链接|Site Links

Powered by
Movable Type 3.34