Disable wildcard [ char in destination

I'm using TCC x64 v13.0 I have a batch file that calls rename. Some of the destination filenames include the [ character, which is legal. However TCC seems to see the [ differently. I'm guessing because it's used for wildcards.

Calling this from the batch file:
rename "Test" "The [Test]"

CC: (Sys) E:\bin\rename_it.bat [33] The system cannot find the file specified.

I've verified that removing only the [ and ] fixes the issue. I can't seem to find a way to turn it off. Is there a way?

Thanks!
 
I'm using TCC x64 v13.0 I have a batch file that calls rename. Some of the destination filenames include the [ character, which is legal. However TCC seems to see the [ differently. I'm guessing

Hi,
Take a look in the help under SETDOS, specifically the /X option.

You may also want to look at the SafeChars plugin, available from http://jpsoft.com/all-downloads/plugins-take-command.html, which has "Functions for reading and writing text which may contain characters having special meaning to TCC".

Joe
 
...or maybe not.

I am using TCC 12.11.76, and I just tried;

Code:
ren The "The[Test]"

and it worked. I then tried;

Code:
ren The "The [Test]"

and that worked also. Ditto for;

Code:
ren Test "The [Test]"

Joe
 
From the SETDOS documentation /X-7 would control the square bracket, but it also controls the other quoation marks. Disabling it, SETDOS /X-7, generates more errors.

I'm runnng TC v13.00.19 x64. Below is what I get in a TC Prompt window. Maybe I should try an older version or the LE version.

[E:\]mkdir test

[E:\]cd test

[E:\test]mkdir Test

[E:\test]dir

Volume in drive E is DATA_1 Serial number is d81a:e94e
Directory of E:\test\*

2/18/2013 7:38 <DIR> .
2/18/2013 7:38 <DIR> ..
2/18/2013 7:38 <DIR> Test
0 bytes in 0 files and 3 dirs
208,204,242,944 bytes free

[E:\test]ren Test "The [Test]"
TCC: (Sys) The system cannot find the file specified.
"E:\test\Test"
0 files renamed

[E:\test]

[E:\test]ren Test "The [Blah]"
TCC: (Sys) The system cannot find the file specified.
"E:\test\Test"
0 files renamed

[E:\test]
 
Like the tree said to the lumberjack, "I'm stumped".

Might be something that is set in OPTION?

Would you by chance be using the [ as a pseudovariable? Use the OPTION command, then click on the Advanced Tab to see.

Mind you, the error coming back is that it cannot find the Test file.

Joe
 
I updated to 13.04.63. I also tried 12.11. Same result.

Interestingly:

[D:\temp]dir

Volume in drive D is Depot Serial number is dce3:2f00
Directory of D:\temp\*

2/18/2013 10:53 <DIR> .
2/18/2013 10:53 <DIR> ..
2/18/2013 10:42 <DIR> test
0 bytes in 0 files and 3 dirs
67,371,462,656 bytes free

[D:\temp]rename test "The [test]"
TCC: (Sys) The system cannot find the file specified.
"D:\temp\test"
0 files renamed

[D:\temp]rename test "The [test"
TCC: (Sys) The system cannot find the file specified.
"D:\temp\test"
0 files renamed

[D:\temp]rename test "The test]"
D:\temp\test -> D:\temp\The test]
1 file renamed

[D:\temp]
 
It works for me:

Code:
C:\bin\tcmd13>ver /r

TCC  13.04.63   Windows XP [Version 5.1.2600]
TCC Build 63   Windows XP Build 2600  Service Pack 3
Registered to Charles Dye - 5 System License

C:\bin\tcmd13>> Test

C:\bin\tcmd13>ren Test "The [test]"
C:\bin\tcmd13\Test -> C:\bin\tcmd13\The [test]
     1 file renamed

C:\bin\tcmd13>dir the*

 Volume in drive C is Windows XP     Serial number is cc26:8769
 Directory of  C:\bin\tcmd13\the*

 2/18/2013  11:10               0  The [test]
                 0 bytes in 1 file and 0 dirs
   315,839,692,800 bytes free

C:\bin\tcmd13>

Do you by any chance have RENAME aliased?
 
No I haven't aliased RENAME. I've tried it on 3 different PCs and with a clean install of TCCLE 12.10 and TC 13.04.63 x64. It works correctly for files. The errors I get are when I try to rename a directory.

Thanks for all the help,

Joe
 
Nevermind. I'm an idiot. I looked everywhere in the documentation but the RENAME documentation. It doesn't directly address my issue (maybe it does and I'm not very bright) but RENAME /S test "The [test]" works. The error message seemed a little cryptic to me.

Thanks again,

Joe
 

Similar threads

Replies
3
Views
1K