ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] rename function   [Help!]

By: Ben Kent       
Date: Aug 12,2019 at 21:10
In Response to: [Help!] rename function (John Miyamoto)

> The part of the renaming macro that I can't work out is how to have
> the macro ask the user to input the new name of the file. I can hard
> code the new file name into the macro, but obviously this only works for
> one specific file. Is it possible to interrupt a macro to ask the user
> for input, and then to continue processing the macro? I haven't found
> any discussion of a way to get user input in the middle of a macro
> process.

John

Martijn's solution is the way to go if you want to use a macro.


The other option in ZTree, is to use the F9 application menu, with an item something like this

:: #ZTset NewName New name:
REM Touch the file
copy /b %1,,+
REM Now rename
ren %1 "%NewName%"
If ErrorLevel==1 Echo something went wrong
pause


With that you could do this if you always want to keep the extension
ren %1 "%NewName%.*"

Ben

954 views      
Thread locked
 

Messages in this Thread

 
96,640 Postings in 12,231 Threads, 350 registered users, 42 users online (2 registered, 40 guests)
Index | Admin contact |   Forum Time: Apr 19, 2024 - 8:11 pm UTC  |  Hits:62,926,418  (7,598 Today )
RSS Feed