Copying files in subdirectories

I know I can't do this with cmd.exe, so, I want to try it here. I'm sure TCC can do this for me.

I have a directory full of subdirectories. In each subdirectory, there's a file. I've got all these files set up in here for a test sequence I need to run. Anyway, all of the files in the respective subdirectories begin with the prefix "test." I'd like to create a couple of test files. I'd like to name the existing file "test1-" instead of just "test." And, I'd like to create a second test file, called "test2-."

Can anyone help me with this? If I'm in the parent directory, is there some way, with a regex, do a kind of "for" command, where I can creep into every sub-directory and do the above?

Apr 2, 2011
North Carolina, USA
[C:\Program Files\JPSoft\TCMD19_x64]global /?
Execute a command in the current directory and its subdirectories.

GLOBAL [/H /I /J /N /P /Q /Sn] command
        /H(idden directories)   /P(rompt)
        /I(gnore exit codes)    /Q(uiet)
        /J(unctions)            /Sn (subdirectory level)
        /N(o junctions)

[C:\Program Files\JPSoft\TCMD19_x64]


Scott Mintz
May 20, 2008
Solon, OH, USA
I haven't tested this, but try:
global /i ren ::test(.*) ::test1-\1

I'm not sure what it is you want to do with test2- however. Create an empty file? Create a copy of test1-?
Similar threads
Thread starter Title Forum Replies Date
redwdc Copying files with spaces, commas, etc. Support 5
S iftp copying pgp files from ftp is not working Support 11
rps Documentation Help file revision - Copying hidden DESCRIPT.ION files Support 19
M Copying files (NOT file contents) to clipboard from TCC Support 17
Charles Dye Difficulty copying DESCRIPT.ION files Support 1
Roedy copying files to DVD or CD Support 3
D When copying/moving, appending " (2)" to filename when the target file already exist. Support 7
P Copying descript.ion file fails Support 8
JohnQSmith Fixed Copying with regex (several issues) Support 7
S Copying descriptions in DESCRIPT.ION Support 3
Joe Caverly Copying text of MSGBOX Support 0
P Copying descriptions Support 4
samintz How to? exclude a subdirectory when copying Support 2
S COPYing attributes Support 3
K Copying and mouse Support 0
CWBillow Windows 7 copying and Take Command Support 5
A GPF when copying large amount of data on busy USB Drive Support 3
p.f.moore Copying Take Command installed folder Support 19
fpefpe How to? shortcuts and batch files Support 4
C v28 key files Support 2
J ffind does not find files Support 4
C duplicate files in multiple plugin sites Support 9
Dmitry L. Kobyakov Fixed The SETARRAY /R command works incorrectly with cyrillic files Support 2
S How to? Deinstalling TC/reinstating execution of bat files by cmd in Win7 Support 31
vefatica FFIND, temp files? ... not deleted? Support 0
R FUNCTION to count NUMBER of files matching a pattern and specific length/not length Support 4
vefatica Tmp files from in-process pipes not deleted Support 6
vefatica Finding files with alternate data streams? Support 4
rps Multi-column DIR /v not displaying all files. Support 5
D How to skip files in a fileset? Support 6
vefatica PIPEVIEW leaves TMP files Support 18
K "copy /z /w" command not deleting read-only files in destination Support 10
Jesse Heines "Taken" date for JPG and PNG files Support 4
O I cannot use links to .btm files Support 5
C How to? rename files with spaces Support 8
R How to? Append files in multiple subfolders using copy? Support 8
Joe Caverly "Functions" in cmd.exe batch files Support 6
S Batch files Calling Batch Files Support 2
vefatica Find Files/Text dialog: does it work? Support 0
Joe Caverly UNZIPping older .ZIP files Support 3
C Documentation default location for LOG files Support 21
P exit /b in batch files Support 7
P Labels in batch files: TCC vs CMD.exe Support 9
M ANSI is used to show files instead of OEM in version 17 to 19 ! Support 5
C 7Z files on forum? Support 0
x13 Problem listing repository files using DIR http(s)://... Support 8
B Can copy command concatenate multiple mp3 files Support 2
J New lexer for TCC batch files. Support 0
M How to? want to download a file from a website enumarate the links and download the files Support 2
keithg1964 TCC RT Install Files Support 1

Similar threads