01-09-2013, 05:38 PM
Hi,
I have multiple arbitrarily named folders such as
c:$Desktop$\TEST\fwdpsd
c:$Desktop$\TEST\asde
c:$Desktop$\TEST\dewd3sceded
c:$Desktop$\TEST\afefew
and I want to add the number i to the folder name
at the beginning of each folder following the alphabetical order.
For the example above, the folders above should be renamed to
c:$Desktop$\TEST\1_afefew
c:$Desktop$\TEST\2_asde
c:$Desktop$\TEST\3_dewd3sceded
c:$Desktop$\TEST\4_fwdpsd
but unfortunately it did not work.
Later I want also to access the folder by only using the numbers, such as
I wonder if someone could tell me the right syntax so that these commands does what I expect.
Thanks in advance for your help
Emerson
I have multiple arbitrarily named folders such as
c:$Desktop$\TEST\fwdpsd
c:$Desktop$\TEST\asde
c:$Desktop$\TEST\dewd3sceded
c:$Desktop$\TEST\afefew
and I want to add the number i to the folder name
at the beginning of each folder following the alphabetical order.
For the example above, the folders above should be renamed to
c:$Desktop$\TEST\1_afefew
c:$Desktop$\TEST\2_asde
c:$Desktop$\TEST\3_dewd3sceded
c:$Desktop$\TEST\4_fwdpsd
I've tried the following:
int i j=5
for(i 1 j)
,out i
,ren F"$Desktop$\TEST\*.*" F"$Desktop$\TEST\{i}_*.*"
Later I want also to access the folder by only using the numbers, such as
int i j=5
for(i 1 j)
,out i
,str fileName.expandpath(F"$Desktop$\TEST\{i}_*.*\{i}")
,run "Notepad.exe" """""" 0x2800 win("Untitled - Notepad" "Notepad")
,'A{fa} ;; Alt
,wait(5 win("Save As" "#32770"))
,'(fileName) Y
,'A{fx}
I wonder if someone could tell me the right syntax so that these commands does what I expect.
Thanks in advance for your help
Emerson