Main Area and Open Discussion > Living Room
Renaming query: how to keep e.g. 1a, 1b when renumbering
Lintalist:
sourcefiles:="Full-path of source.txt" is not correct, but it doesn't matter. I updated the code above once more.
You can now try and "see" what the script "sees" remove the ; before one or both of the MsgBox lines so you can "check" if the source.txt is read correct and if the source/targetfiles are correct. If you have many files pressing the MsgBox each time is tedious so try with a source.txt file with only a few files in it or cancel the script (scripts tray icon, right click, exit)
Finger Crossed 3 :-)
tomos:
Yes !!
Success !
Initially didnt work, possibly cause location of source.txt was in a folder with spaces in the name (I did put path in "inverted commas").
Moved that and it worked fine.
And it followed the 0001 / 0001a / etc pattern
Thank you very much Lintalist :Thmbsup:
EDIT// I tried it without removing comment ";" for message box -- as said above, it worked fine out of the box.
Does strip out text, but there's so few of them I can re-add manually if I want
Lintalist:
Phew, glad to hear it worked ;D
tomos:
;D
one last request (anytime -- I wont get to it for a few days):
can I start the counter for a second batch @ e.g. 0123
Looks like this could be the relevant line, but cannot think what to change:
counter:=SubStr("000" A_Index, -3)
Getting late here, I'm off -- many thanks again Lintalist :)
tomos:
EDIT// I tried it without removing comment ";" for message box -- as said above, it worked fine out of the box.
Does strip out text, but there's so few of them I can re-add manually if I want
-tomos (January 30, 2018, 03:38 PM)
--- End quote ---
Correction:
it doesnt strip out the text -- it doesnt rename those files, and leaves that new number free e.g. the first file had text after the number, and the renamed files started with 0002 -- so I was able to manually rename the file (with the text) to fit in as 0001_text_here.jpg i.e. it works perfectly :up:
nite!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version