Hi, I am trying to create a batch file to do the followings tasks.
Iv'e got a project folder and that has all the settings. When I create a new project folder then I copy the folder "New Projects" and rename it. But that has to be done by script or the batch file. And the issue is, the batch file or the script file should prompt the user to enter the new folder name. The old folder name is always same, But the new folder name is always different.
I am trying to create a batch file but it's failled. Enyone can help me?
Thanks a lot!
Batch file to rename a folder and prompt the user
Moderator: DosItHelp
-
- Posts: 1
- Joined: 10 Nov 2008 06:54
kumar_thabe,
How about this:
DosItHelp?
How about this:
Code: Select all
@echo off
set "prjFolder=c:\YourProjectFolder\"
set "srcFolder=New Projects"
set /p "trgfolder=Enter Name for Target Folder: "
xcopy /discy "%prjFolder%%srcFolder%" "%prjFolder%\%trgfolder%"
pause
DosItHelp?