Saved Bookmarks
| 1. |
Solve : Running a batch file from with a batch file not working right? |
|
Answer» I am trying to create a directory based on three variables. Then I use the "civmd.bat" file to create subdirectories under that in a standardized format. @ECHO OFF Everything works as planned except that the civmd.bat file that is being "called" runs in whatever directory I have this input.bat file. Not in the "D:\%uname%\%uname2% %caseno%" directory.Is the input.bat STORED in a folder on the D drive? The reason I ask is that a CD command will not work if the new directory is on a different drive form the current folder unless you use the /D switch to change the drive, e.g. Code: [Select]cd /d "D:\%uname%\%uname2% %caseno%" Or you can change the drive first: Code: [Select]D: cd /d "D:\%uname%\%uname2% %caseno%"No, it wasn't. It was on my c:\temp. I took it from your question that would matter, so I moved it and it worked. |
|