Computing.Net > Forums > Disk Operating System > Rename in a Batch file

Rename in a Batch file

Reply to Message Icon

Original Message
Name: SiyMan
Date: March 16, 2003 at 00:59:39 Pacific
Subject: Rename in a Batch file
OS: Dos
CPU/Ram: Duron 1200+/382 SD
Comment:

Can anyone help me. I made a btach file and in the file is a commandline with the command rename. But the rename command is a share command wich not works after the compiling. The eroor is my line. I wrote "rename *.* *.069". If I write "rename filename.* *.069" the command works.
Can anyone give me a tip how I can use the rename command in a compiled btach file with the *.* command ?

Sorry for my bad english, I came from germany and I canīt speak english well.


Report Offensive Message For Removal


Response Number 1
Name: Miskva
Date: March 16, 2003 at 02:21:45 Pacific
Reply: (edit)

Please specify the actual code, I dont really get the problem


Report Offensive Follow Up For Removal

Response Number 2
Name: Secret_Doom
Date: March 16, 2003 at 09:18:55 Pacific
Reply: (edit)

You want to rename all files from current directory to a same extention, is that it?

What do you mean by "compiled batch"? You're using a program like bat2exe or bat2com to convert the script, is that it?

And finally, what's your exact OS? If you're under Windows, state your WINDOWS VERSION (e.g.: 95, 98, NT4, 2000, XP, etc).

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br


Report Offensive Follow Up For Removal

Response Number 3
Name: SiyMan
Date: March 17, 2003 at 04:53:43 Pacific
Reply: (edit)

Okay, I have Windows XP, but thats not the Problem, because I had copy me all Dos *.com files for a perfect funcionality.

The Code is
echo off
echo.
echo. All files will be renamed.
echo.
echo. *****
cd..
rename *.* *.069
echo.
echo. All files are renamed.
pause > nul
cls

And compiled means compiled with bat2com.


Report Offensive Follow Up For Removal

Response Number 4
Name: Kyle Rogan
Date: March 17, 2003 at 18:59:28 Pacific
Reply: (edit)

I don't have any trouble running that code in Win98 (unless I have two files with the same name and different extensions).

What happens if you run the batch file without using bat2com on it first?


Report Offensive Follow Up For Removal

Response Number 5
Name: SiyMan
Date: March 18, 2003 at 11:50:14 Pacific
Reply: (edit)

Syntaxerror
The system couldnīt be able to find the files.
Syntaxerror

O.K, thats the problem, the rename command couldnīt rename someone files to *.069 files, because itīll have fully filenames.
But how can I kick the problem ?


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Rename in a Batch file

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge