Home > Software engineering >  Batch orders, to name the file folder name
Batch orders, to name the file folder name

Time:09-22

Such as topic, than I have "A to Z" folder, each folder has A file, I now want to batch each folder that file renamed the upper directory folder name (A folder has A 1. TXT file, the 1. TXT to A.t xt), how to write the code?

If each folder is not only a file, only the specified file instead?


Each folder is the same

CodePudding user response:

Whether you want to batch orders, or VB code?

CodePudding user response:

 the name "A \ 1. TXT" as "A \ A.t xt" 
The name "B \ 1. TXT" as "B \ B.t xt
"The name "C \ 1. TXT" as "C \ C.t xt
"The name "D \ 1. TXT" as "D \ which xt
"The name "E \ 1. TXT" as "E \ e. xt
"The name "F \ 1. TXT" as "F \ F.t xt"
The name "G \ 1. TXT" as "G \ G.t xt"
The name "H \ 1. TXT" as "H \ H.t xt"
The name "I \ 1. TXT" as "I \ I.t xt
"The name "J \ 1. TXT" as "J \ j.t. xt
"The name "K \ 1. TXT" as "K \ K.t xt
"The name "L \ 1. TXT" as "L \ L.t xt"
The name "M \ 1. TXT" as "M \ m. xt
"The name "N \ 1. TXT" as "N \ N.t xt
"The name "O \ 1. TXT" as "O \ O.t xt
"The name "P \ 1. TXT" as "P \ P.t xt"
The name "Q \ 1. TXT" as "Q \ Q.t xt
"The name "R \ 1. TXT" as "R \ R.t xt"
The name "S \ 1. TXT" as "S \ S.t xt"
The name "T \ 1. TXT" as "T \ T.t xt"
The name "U \ 1. TXT" as "U \ U.t xt"
The name "V \ 1. TXT" as "V \ V.t xt"
The name "W \ 1. TXT" as "W \ W.t xt"
The name "X \ 1. TXT" as "X \ X.t xt
"The name "Y \ 1. TXT" as "Y \ Y.t xt"
The name "Z \ 1. TXT" as "Z \ Z.t xt
"

CodePudding user response:

Upstairs positive solutions, thank you teach,

CodePudding user response:

 Dim I As Byte, strPath As String 

StrPath="C: \ test \ testfile "
For I=Asc (" a ") To Asc (" z ")
The Name strPath & amp; CRH (I) & amp; "\ 1. TXT" As strPath & amp; CRH (I) & amp; "" & amp; CRH (I) & amp; ". TXT "
Next I

CodePudding user response:

reference yushulinfenglaoshiji reply: 3/f
upstairs positive solutions, thank you teach,

Ha ha...

This kind of code, is really "majestic"!!!!!!

CodePudding user response:

reference 5 floor Chen8013 reply:
Quote: refer to the third floor yushulinfenglaoshiji response:

Upstairs positive solutions, thank you teach,

Ha ha...

This kind of code, is really "majestic"!!!!!!

http://bbs.csdn.net/topics/380157851

CodePudding user response:

reference 4 floor of123 response:
 Dim I As Byte, strPath As String 

StrPath="C: \ test \ testfile "
For I=Asc (" a ") To Asc (" z ")
The Name strPath & amp; CRH (I) & amp; "\ 1. TXT" As strPath & amp; CRH (I) & amp; "" & amp; CRH (I) & amp; ". TXT "
Next I

Simple, efficient, embodies the power of programming

CodePudding user response:

Lixia and processing
  • Related