Apologies if this is posted in the wrong area, I couldn't find a specific area for scripting issues and as its using the windows 7 diskpart cmd I thought it could go here.
I am trying to automate the process of formatting a hard drive with Diskpart:
select disk 1
create partition primary
format fs=ntfs label="CCTV" quick
I have searched the internet and understood that i should create a .txt file with that code, then create a .bat file of:
DISKPART /s c:\file location\script.txt
However whenever i run the .bat file i just get a cmd window displaying the text of my .bat file
When i go into diskpart and call the script manually i get:
diskpart was unable to open or read the script file.
make sure the file you specified exists.
It goes without saying i am running everything with administrator privileges. I am new to .bat files etc so am in completely untested water for me.
If anybody knows what i am doing wrong then please come back with suggestions
I am trying to automate the process of formatting a hard drive with Diskpart:
select disk 1
create partition primary
format fs=ntfs label="CCTV" quick
I have searched the internet and understood that i should create a .txt file with that code, then create a .bat file of:
DISKPART /s c:\file location\script.txt
However whenever i run the .bat file i just get a cmd window displaying the text of my .bat file
When i go into diskpart and call the script manually i get:
diskpart was unable to open or read the script file.
make sure the file you specified exists.
It goes without saying i am running everything with administrator privileges. I am new to .bat files etc so am in completely untested water for me.
If anybody knows what i am doing wrong then please come back with suggestions