Copy - Rename Original

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
breathe67
New Member
New Member
Posts: 1
Joined: 2018-07-24, 14:50 UTC

Copy - Rename Original

Post by *breathe67 »

Hey all,

This seems like a very simple request, so maybe I'm just missing something, but I can't seem to figure out a way to do it without creating a batch file.

We copy files from a central FTP server to work on them, and while they're being worked on the local machines, we rename the file with a tag to notify anyone else who may want to grab it that the file is checked out.

So, just as a for instance, say you've got files KY227.ntw, KY228.ntw, KY229.ntw, KY870.atv, KY870.cpr, KY870.tap, KY870.cbl, and KY870.par.

When we copy these files from the server, the local copies retain their original name, but the server copies need to be renamed with a tag, as in:

KY227 TAC 20180724.ntw
KY228 TAC 20180724.ntw
KY229 TAC 20180724.ntw
KY870 TAC 20180724.atv
KY870 TAC 20180724.cpr
KY870 TAC 20180724.tap
KY870 TAC 20180724.cbl
KY870 TAC 20180724.par

Currently we're just doing this as two steps, copying then using the multi-rename tool. But since we have to scroll through thousands of files to reselect the ones we need, it's not the most convenient thing in the world.

Hopefully somebody here knows something I've missed that can simplify the process.

Thanks!
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Copy - Rename Original

Post by *Stefan2 »

Hi breathe67 and welcome.

For such individual tasks a batch (or PoSh/VBS/JS/AHK) would be IMHO the best way.

TC can aid you by providing a list with (\path\)names of all selected file by use of parameters like %F, %L or %WF and also "%T"
(right click a button on the buttonbar > choose "Modify" > in the open dialog press F1 and read the help)

In your script you would say:
- TAG = ask user for TAG
- for each line / file
--- copy file to "%T"
... rename file to BASE + TAG + EXT
- Next file



Next create a user defined command, which you can use as button or assign a shortcut too.
(see viewtopic.php?f=3&t=49079&p=344780#p344777)

[em_Dummy]
cmd="D:\rive\path to\script.ext"
param="%WF" "%T"


-or- more portable:
[em_Dummy]
cmd="%Commander_path%\myTools\Scripts\script.ext"
param="%WF" "%T"




Other ideas?
 
Post Reply