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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Rename in a Batch file

Reply to Message Icon

Name: SiyMan
Date: March 16, 2003 at 00:59:39 Pacific
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.



Sponsored Link
Ads by Google

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

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


0

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

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


0

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

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.


0

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

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?


0

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

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 ?


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Rename in a Batch file

Max Line Length in a batch file www.computing.net/answers/dos/max-line-length-in-a-batch-file/9738.html

want specify enter in a batch file www.computing.net/answers/dos/want-specify-enter-in-a-batch-file/14558.html

length of a string in a batch file www.computing.net/answers/dos/length-of-a-string-in-a-batch-file/13650.html