Running ME 3.9a and just up(down?)graded to Windows 8.1 from XP
Self-taught, so i am assuming this is a klugy way to do this, but i need to rename a list of files. Everything worked great in XP, then had to move to 8.1
The problem is the XP versions of rename a file (Alt-F, then M), now translated to 8.1 (Alt-H, then R) don’t seem to grab the filename so i can copy it into the clipboard.
I run this from the DETAILS view of a folder.
I'll make a decision about how many of the files to do in the list based on the names, or dates modified, or whatever.
I highlight the first file in the list that i want to rename, then start the macro.
In the Repeat Prompt command, tell ME how many files i want to rename.
It just runs down the list of files in DETAILS view.
Currently doing this:
Clear All Variables: All
Clipboard Empty
Variable Set String %T6% from Window Title
Activate Window: "%T6%"
Repeat Prompt Start (Prompt for repeat count at macro play time)
Activate Window: "%T6%"
Wait For Window Title: "%T6%"
Text Type: <ALT><ALT>H
Delay 50 Milliseconds
Text Type: R
Delay 50 Milliseconds
Clipboard Copy
Variable Set String %T3% from Clipboard
....At this point i do a lot of file name manipulation based on the current filename that is in Clipboard (and %T3%). The new filename is placed in %T7%
// Write new file name
Text Type: <DELETE>
Delay 50 Milliseconds
Text Type: %T7%
Text Type: <ENTER>
Delay 200 Milliseconds
If Not Window Title "%T6%" on top
Text Box Display: Variables
Text Type: N<ENTER>
End If
Wait For Window Title: "%T6%"
Repeat End
Audio Unmute
I feel like there’s a much simpler way to do this, but the macro has organically grown into this based on what worked, and my ignorance of what ME commands might be more efficient for this.
I know there’s a “Rename Files or Folders” command, but i need to get the filename into a variable so i can make decisions about how to rename it based on the current filename. (Hence the Alt-H and R commands).
I feel stupid, but i can’t seem to find any other way in ME to get the current filename into a variable. All the ME commands seem to want the filename as an input, but my filenames change as the macro goes down the list of files.
Any help making this more efficient or robust would be appreciated.