New Batch scripter, Please help.
Moderator: DosItHelp
New Batch scripter, Please help.
Hello all
I'm just getting into batch scripting and seem to have struck a problem.
I've managed to create a new Folder with the "MD C:\..." command.
Now I want to display hidden files on the C: drive, but it just tells me "The system cannot find the path specified".
The command I entered was: "DIR C:\ /A:H".
I've even tried simply putting "DIR C:" and "DIR C:\", to no avail.
Any help would be greatly appreciated.
I'm just getting into batch scripting and seem to have struck a problem.
I've managed to create a new Folder with the "MD C:\..." command.
Now I want to display hidden files on the C: drive, but it just tells me "The system cannot find the path specified".
The command I entered was: "DIR C:\ /A:H".
I've even tried simply putting "DIR C:" and "DIR C:\", to no avail.
Any help would be greatly appreciated.
Re: New Batch scripter, Please help.
Are you saying that the following command does not work for you? It gives you no output and gives you an error? If so what is the error?
Code: Select all
dir C:\
Re: New Batch scripter, Please help.
Yes, I tried that and it said "The system cannot find the path specified".
Very confused.
Very confused.
Re: New Batch scripter, Please help.
This is my code:
MD C:\"Batch Script"
DIR C:\
It makes the folder, then shows the error I mentioned.
MD C:\"Batch Script"
DIR C:\
It makes the folder, then shows the error I mentioned.
Re: New Batch scripter, Please help.
Well if you made a directory on the C:\ drive you should have a C:\ drive and you should be able to get a directory listing.
Open up a cmd prompt and type the following command.
Then right click on the Window Title Bar.
Chose Edit
Chose Select All
Then hit the Enter Key.
This copies everything from the command window to the clipboard.
Paste that output here.
Open up a cmd prompt and type the following command.
Code: Select all
C:\>fsutil fsinfo drives
Then right click on the Window Title Bar.
Chose Edit
Chose Select All
Then hit the Enter Key.
This copies everything from the command window to the clipboard.
Paste that output here.
Re: New Batch scripter, Please help.
CD C:\
fsutil fsinfo drives
Comes up with the error "The fsutil utility requires you have administrative privileges"
fsutil fsinfo drives
Comes up with the error "The fsutil utility requires you have administrative privileges"
Re: New Batch scripter, Please help.
Dewars wrote:Comes up with the error "The fsutil utility requires you have administrative privileges"
Can you run CMD as an administrator? If yes, do it and run the code again.
Re: New Batch scripter, Please help.
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\windows\system32>CD C:\
C:\>fsutil fsinfo drives
Drives: C:\ D:\ E:\ F:\ G:\
C:\>
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\windows\system32>CD C:\
C:\>fsutil fsinfo drives
Drives: C:\ D:\ E:\ F:\ G:\
C:\>
Re: New Batch scripter, Please help.
Run this batch file and paste the screen output into a reply.
@echo off
md "c:\Batch Script" 2>nul
dir c:\b* /b
pause
Re: New Batch scripter, Please help.
Batch Script
Press any key to continue . . .
Press any key to continue . . .
Re: New Batch scripter, Please help.
Dewars wrote:Batch Script
Press any key to continue . . .
It means the folder was created successfully.
Re: New Batch scripter, Please help.
I think everything is working fine now. Thanks to everyone that helped.