Hi Rex !
One way of accomplishing this is to write a DOS batch file.
Create a new file named RexRename.bat in a Text Editor ; notepad for instance.
The contents of RexRename.bat are then:
Attrib +r *.123
Ren *.123 *.ABC
After you have saved the batch file to a location you know,
make a button set as an MS-DOS Batch Function.
Then modify and use the command:
Path\To\RexRename.bat
porcupine
edit note :
And just maybe John Zeman won't catch me doing something here ! ( Joke )
With a little more thought, I realized that the RexRename.bat isn't needed here.
Try just using these DOS commands in a button set as an MS-DOS batch function.
Depending on the number of files selected and being renamed... might it be that he is running into the whole 'timing' issue thing with executing multiple commands? Like we see when people try to perform multiple rename sweeps in one button?
I created a folder and copied 50 files of various extensions... cleared all attributes of these files... copied each file 10 times with auto-rename for a total of 550 files in the folder... renamed all from from ). to *).123... giving me 500 *.123 files... ran the following commands from a button:
sync:dopusrt /cmd Select *.123
sync:dopusrt /cmd SetAttr ATTR=r
sync:dopusrt /cmd Rename FROM *.123 to *.ABC
It didn't work - I got a SetAttr error:
"An error occurred modifying 'schedlgu (10).123'
The system cannot find the file specified. (2)"
I was hoping the sync:dopusrt would cause the rename command not to run until the SetAttr were all finished . I then hit which undid the rename, and ran the button again and it worked fine. I guess the previous operation cached the files so that the subsequent SetAttr was able to finish real fast. I then tested against a different folder with 50 different files, but only made 2 copies of each file... running the button above worked the first time without any errors.
It would be OH SO HELPFUL if Opus could provide a rock-solid way of specifying how it should handle multiple command execution at least for it's own internal functions so that we could govern it 2 ways:
a) execute each command against all selected files, letting each command finish before the next command is started.
b) execute all commands against each selected file, letting all commands finish before the next selected file is processed.
[quote]It would be OH SO HELPFUL if Opus could provide a rock-solid way of specifying how it should handle multiple command execution at least for it's own internal functions so that we could govern it 2 ways:
a) execute each command against all selected files, letting each command finish before the next command is started.
b) execute all commands against each selected file, letting all commands finish before the next selected file is processed.[/quote]
Ditto Steje,
It's just wonderful when the simultaneous execution is useful.
This was very helpful with the Copy GUI in my PHP Album Archiver attempt for instance.
However, we really do need an option for an absolute exit code for DOpus functions .
Perhaps we could start another thread on this and some of the headaches and heartaches the lack of it has caused.
Select *.123
SetAttr ATTR=r
Rename FROM *.123 TO *.ABC
[/quote]
Ooops ! I hadn't actually tried it.
I assumed that if it didn't work for Steje, it wouldn't work for me.
I've run this several times now on 932 jpg's without any errors at all.
I had suggested the MS-Dos solution because it was simple and I knew it would work .