Page 1 of 1
New Batch scripter, Please help.
Posted: 12 Apr 2012 07:52
by Dewars
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.
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 07:56
by Squashman
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?
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 07:59
by Dewars
Yes, I tried that and it said "The system cannot find the path specified".
Very confused.
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 08:06
by Dewars
This is my code:
MD C:\"Batch Script"
DIR C:\
It makes the folder, then shows the error I mentioned.
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 08:06
by Squashman
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.
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 08:12
by Dewars
CD C:\
fsutil fsinfo drives
Comes up with the error "The fsutil utility requires you have administrative privileges"
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 09:11
by Fawers
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.
Posted: 12 Apr 2012 09:44
by Dewars
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:\>
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 09:50
by foxidrive
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.
Posted: 12 Apr 2012 10:29
by Dewars
Batch Script
Press any key to continue . . .
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 10:34
by Fawers
Dewars wrote:Batch Script
Press any key to continue . . .
It means the folder was created successfully.
Re: New Batch scripter, Please help.
Posted: 12 Apr 2012 10:46
by Dewars
I think everything is working fine now. Thanks to everyone that helped.