Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOS Batch problems after moving directory

Status
Not open for further replies.

hoots

IS-IT--Management
Jul 17, 2000
4
GB
I have moved a directory from one NTFS disk to another and now no DOS batch files will execute. I either get "Bad command or file name" or infinite scrolling of "Batch file missing". Reinstating the files to the original NTFS volume results in normal operation. I can only assume there is something different about the NTFS volumes?!

Any ideas would be greatly appreciated.
 
What directory/folder are you trying to move? Check your path environment. The folder you moved may be in there and is being used by your batch files. If that's the case, then you can not transfer the folder. Why do you want to transfer the folder in the first place?
 
There is nothing special about the moved directory other than it's size which necessitates the move. I simply cut and pasted the directory and set up the network share, with the same name, to point at the new location. The folder is not part of the path.
 
Ok. When you say "no DOS batch file will execute", can you look into this batch file (via notepad) and check if it's calling a file which is in the folder you moved?
 
I've created a temp.bat with "dir" as the contents which does not work. This gives me the infinite scrolling error mentioned earlier. Most of the batch files affected actually run SQLPlus which works OK at the DOS command prompt. There is no directory dependancy involved.
 
Are the DOS batch files located in the moved folder, or are they located in the drive that was vacated by the moved folder. DOS batch files depend on the instruction set located within c:\winnt, ( if that is where NT is located ), and your environment needs to reflect that. Also, when you move a folder from one NTFS drive to another, you need to check that the permissions did not change on the folders that were moved. Remember: permissive rights flow down in the directory structure, if the root drive, or parent directory that you have moved the folder to has a different set of permissions, your original permissions are overwritten. It is possible that you don't have the right to execute files anymore. Another tip: the most restrictive rights take precedence, that is if Admin is set to have complete access, but the group everyone has no access, you might lock out admin becuase everyone has no access.
 
The DOS batch files are indeed located in the moved folder.
I have checked the permissions on both NTFS volumes. They both give the everyone group full access so I guess this is not the problem.

I have found out that the problem is specific to W98 PC's. NT Workstation boxes run the batch files correctly!?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top