Hmm, it works OK here Both under WIndows 7 and 10. Are you running the script on a network share? - it might not work there.fliptoback wrote: ↑2019-05-16, 12:48 UTCHmm..I could not get this to work. I copied the code, and right click at the menubar and press paste. it created the button but when i select the files and pressed it, it run the batch file but did not change any filenames.petermad wrote: ↑2019-05-16, 10:42 UTC 2fliptoback
You can also incorporate A DOS script like this directly in the button:You will get a beep if you have not selected at least one file or if you are trying to run the script from a place where DOS does not work - like inside Archives, FTP sites or Virtual panels. It works with Unicode file names, and for hidden and system files - BUT the hidden/system file attributes will be removed.Code: Select all
TOTALCMD#BAR#DATA %COMSPEC% /C if not exist "%P" (echo •) else if exist %Y%P%S1\ (echo•) else chcp 65001 && %%COMSPEC%% /C for /F "usebackq delims=" %%n in (`type %WL`) do attrib -H -S "%%n" && %%COMSPEC%% /C for /F "usebackq delims=" %%n in (`type %WL`) do if not exist "%%n\*" ren "%%n" "%%~nn_Panasonic%%~xn" wciconex.dll,32 Add "_Panasonic" to selected filenames -1
BTW - if you get it to work, and you don't want to see the DOS window popping up use this in stead:
Code: Select all
TOTALCMD#BAR#DATA
%COMSPEC% /C
if not exist "%P" (echo •) else if exist %Y%P%S1\ (echo•) else chcp 65001 && %%COMSPEC%% /C for /F "usebackq delims=" %%n in (`type %WL`) do attrib -H -S "%%n" && %%COMSPEC%% /C for /F "usebackq delims=" %%n in (`type %WL`) do if not exist "%%n\*" ren "%%n" "%%~nn_Panasonic%%~xn"
wciconex.dll,32
Add "_Panasonic" to selected filenames
1
-1