0002-TIPS swap names of 2 files (same dir)
Moderators: white, Hacker, petermad, Stefan2
- mikecosterus
- Junior Member
- Posts: 22
- Joined: 2003-04-13, 08:23 UTC
- Location: Austria
0002-TIPS swap names of 2 files (same dir)
This Button TIP swaps the names of 2 selected files in the same directory:
you can copy this in your DEFAULT.BAR and change the number X in the next available one...
buttonX=shell32.dll,66
cmdX=[specify your dir\]swap.bat
iconicX=-1
paramX=%L
menuX=SWAP names of 2 files
create (SHIFT-F4) the swap.bat in the [specify your dir\] used in cmdX and copy this in it:
@echo off
set f1=
for /f "tokens=* delims=*" %%a in (%1) do (
If not defined f1 set f1=%%a
set f2=%%a)
ren "%f1%" s
move "%f2%" "%f1%"
move s "%f2%"
Save everything and test!
NOTE: This swap feature doesn't work with filenames/directories with Extended ASCII characters (character codes 128 - 255).
If I have a fix, I'll let y'all know. If you have a fix, let ME know!
MIKE
P.S.: Tell me, is it possible to assign a short-cut key to a button??
I bought Perfect Keyboard Pro (www.pitrinec.com/pkindex.htm) to work faster then any mouse-man, but TC internal shortcuts would be nice
you can copy this in your DEFAULT.BAR and change the number X in the next available one...
buttonX=shell32.dll,66
cmdX=[specify your dir\]swap.bat
iconicX=-1
paramX=%L
menuX=SWAP names of 2 files
create (SHIFT-F4) the swap.bat in the [specify your dir\] used in cmdX and copy this in it:
@echo off
set f1=
for /f "tokens=* delims=*" %%a in (%1) do (
If not defined f1 set f1=%%a
set f2=%%a)
ren "%f1%" s
move "%f2%" "%f1%"
move s "%f2%"
Save everything and test!
NOTE: This swap feature doesn't work with filenames/directories with Extended ASCII characters (character codes 128 - 255).
If I have a fix, I'll let y'all know. If you have a fix, let ME know!
MIKE
P.S.: Tell me, is it possible to assign a short-cut key to a button??
I bought Perfect Keyboard Pro (www.pitrinec.com/pkindex.htm) to work faster then any mouse-man, but TC internal shortcuts would be nice
Re: 0002-TIPS swap names of 2 files (same dir)
You can just put this command to Start menu and assign a shortcut to that menu entry.mikecosterus wrote: Tell me, is it possible to assign a short-cut key to a button??
You can do it in two ways:
1. Just assign hotkey in 'Change start menu' dialog. You can access only Ctrl+Alt+Fn and Ctrl+Alt+Shift+Fn shortcuts there.
2. Or you can assign hotkey to cm_usermenuX command. X is a number of that entry in Start menu.
Try Windows PowerPro. It's freemikecosterus wrote: I bought Perfect Keyboard Pro (www.pitrinec.com/pkindex.htm) to work faster then any mouse-man, but TC internal shortcuts would be nice
- mikecosterus
- Junior Member
- Posts: 22
- Joined: 2003-04-13, 08:23 UTC
- Location: Austria
[face=courier]On 13-04-2003 22:35:06 +0000 mikecosterus wrote:
m> Can you imagine...I never used the Start Menu
From v.5.51 it has a new functionality.[/face]
m> Can you imagine...I never used the Start Menu
From v.5.51 it has a new functionality.[/face]
[face=courier]The Protoss do NOT run from their enemies.
It is here, that we shall make our stand.[/face]
It is here, that we shall make our stand.[/face]
- mikecosterus
- Junior Member
- Posts: 22
- Joined: 2003-04-13, 08:23 UTC
- Location: Austria
2 ZA222: CORRECT!
I was unable to delete the spaces at the end of the code(phpbb glitch?),
not even with the
I was unable to delete the spaces at the end of the code(phpbb glitch?),
not even with the
Code: Select all
attribute..
so if you COPY this the code..remove the spaces at the end!
Sorry for the inconvenience....
MIKE
BTW: How long did it take you 2 figure that out???? :shock: