Over 1 million tech questions and answers.

Batch File to Check Hard Drive Space

Q: Batch File to Check Hard Drive Space


I'd like to run a batch file to check hard drice space on an XP computer, and if there is enough space available, run some commands to copy files. I have already completed the copy component of the batch file, but need some help with the hard drive checking. Anyone have any suggestions/willing to help?

Here's what I'm looking for in 'english'.

If the amount of hard drive space on C is greater than 15 GB, then run this command


Else - end batch file

Preferred Solution: Batch File to Check Hard Drive Space

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Batch File to Check Hard Drive Space

Read other 7 answers

I'd like to run a batch file to check hard drive space on an XP computer, and if there is enough space available, then run some commands to create a directory to copy the files from remote server.

Read a text file with all the server ips
Run as service account
Verify that there is enough space on C:
Create a Install directory on remote server
Then copy the file from my computer remote server.

Can anybody please help me!!!

A:batch file to check hard drive space on an XP computer, and if there is enough space

I found this code on "SpiceWorks.com'.

I have not tested. I have not test (just to be clear). It's set up to determine % of free space (on a text file listing of servers) but could be modified to do what you want.

Read other 1 answers

My solid state drive is half full of with and unknown CAB file (see attached WinDirStat report. I'm running out of space. I've disabled imaging and everything else that I can find to disable and have all data on my D drive which is setup with 2 drives 1 TB each for a total storage space of 1 TB. Your assistance is greatly appreciated! The attached screen shot from yesterday has the file size at 66.3 and today it is at 67.5. Looks like computer cancer.

Thanks so much for considering this.

A:running out of hard drive space. 67.5GB unknown CAB file wasted space

Hello and welcome to the forums, jjvvbb!

Your attachment(s) aren't visible to us.

Please reattach your WinDirStat report properly using this following guide:-

Screenshots and Files - Upload and Post in Seven Forums

Alternatively, you could also generate a screenshot of your WinDirStat window and upload it for our perusal using this guide:-


Read other 5 answers

Earlier today, I downloaded Acronis True Image, before the download, I checked the available space on my C drive. I was told by Acronis that the download would only take 518MB on the disk but after the download I see there is over 9GB less free space. Is there anyway I can check what has happened?

Any help or advice would be greatly appreciated.

Read other answers

Can anyone please give me the following script ?
i need abtch script which should check for file
if it sees the file then----> execute other batch script
if not it has to wait for 2mins check again..

A:how to check a batch file in Windows ?


You can use something like:

@echo off
if exist CheckFor.Me (call RunMe.bat) else (
PING -n 1 -w 120000 >NUL
goto begin
Here you are checking for a file called CheckFor.Me
If the file exists it runs another batch file called RunMe.bat
If the file doesn't exist it pings for 2min and then starts over.
:Begin is a label. Once it is finished pinging it goes back to the label called :Begin

Note 120000 milliseconds = 120 seconds = 2 min

Read other 2 answers

Hi Everyone,

I'm new to batch files but I want to create a batch file to run at startup on Windows 7 so when a user logs in with there username and password into the network to see if the Xerox 7535 network printer is installed and if it isn't to install it.

Now because these are computers that multiple users use frequently if I were to do this manually I would need the user to login to the network with there credentials and then open a window and type in //printer_server_name/ and a window would pop up and again they would have to type in there network credentials (username & password) then select the printer Xerox 7535 printer and right click on it and select connect and it would install the printer drivers if needed.

Now when I login as administrator to the computer I can connect to the printer server but when I try to connect/install to the Xerox 7535 printer it doesn't install and I get Error:"0x0000052e so instead I have to have each user login into the computer and install the printer which works that way.

I'm open to any other ways of doing this and I really appreciate the help.



A:Creating a batch file to check and see if a

closing duplicate, original is at http://forums.techguy.org/windows-7/1145562-how-create-batch-file-install.html.

Read other 1 answers

Hi my friend,
Everyday a lot of new text files are created in a specific directory by an electronic invoice software. Nobody know why but in the end of the file there are a lot of blank spaces and it is causing a lot of problems when we're going to process all of them.
I removed these blank spaces from the end of the files manually and all files were processed well.
So I'd like to ask if somebody could help me to create a batch to remove double (or more) blank spaces from the files.
Thanks so much

A:Batch File to Remove Blank Space in Text Files

This worked for me under XP, I found it on another site. On the command line use the original file name and a new name to represent %1 and %2.

For example: CleanFile.bat OriginalText.txt NewFile.txt

@Echo Off
For /F "tokens=* delims=" %%A in (%1) Do Echo %%A >> %2

Read other 1 answers


I am kind of new to this batch scripting and was wondering how one could check the existence of a file or folder in a batch program. I am using XP.
Any help or suggesstions is greatly appreciated. Thanks.

Jerardfjay :-)

A:check existence of file or folder in batch

Hi Jerardfjay and welcome to TSF!

If you're making a dos style batch file, the info you're looking for should be this:

IF [NOT] EXIST filename command ELSE command

IF EXIST hello.txt (
DEL hello.txt
) ELSE (
ECHO hello.txt is missing
the 'NOT' is optional, as is the 'ELSE' section

More information can be found by typing HELP IF at the command prompt.

Read other 7 answers

I have just started trying to do some code for MS-Dos Batch files. I have written a few minor things like, returning someones text they enter. But I have been searching all over google and I can't find out how to do this:

How can I make it so every 5 minutes, the MS-Dos Batch file will check if a .exe file is running, if it is, leave it and starting counting again, and, if it isnt, start it and start counting again.


p.s. nice christmas smilies

A:MS-Dos Batch File Check if Program is running and exceute

Read other 13 answers

A few days ago someone has the same question as i do. And also the solution was given by Chicon , thank you for that.
@ECHO off


%SystemRoot%\Test\pv.exe -d10000

%SystemRoot%\Test\pv.exe > result.txt

FIND "spider.exe" result.txt
IF ERRORLEVEL 1 START %SystemRoot%\system32\spider.exe

Now comes my question:
What if an .exe program starts with a dialogbox with only the buttons Start and Stop in it.
How is it possable to "click" on the start button with DOS code.
The example above is Spider Solitaire , it has 3 radio buttons , an OK button and a Cancel button, I am only interesting in the OK button.

A:Check if Program is running and execute with batch file

Hi ScreenShot,

Welcome to TSG !

Personally, I do not know Spider Solitaire but some applications accept parameters either they are launched from a shortcut or a DOS batch. Also, other applications use the parameters generally stored in their .INI files.
In your case, the trick would be to know wich parameters the process 'spider.exe' accept in order to force the 'Ok' button or to skip the dialog box or which parameter must adapted in the .INI file.
Unfortunately, I can't answer you about the way Solitaire Spider can be launched the way you wish.

Read other 2 answers

Hi to all.

I need to make a cmd that checks the status of another process to see if that other process is already over. And execute the commands only when that procces is over.

This is the full description of the problem:

In my server I got 2 jobs ("Unzip.cmd" and "Rename.cmd").
This 2 jobs must be executed in order: first the Unzip.cmd and then the Rename.cmd.

The Unzip.cmd, unzips a file in the same directory
And the Rename.cmd, rename that unziped file.

The problem is that some times the unzip procees takes too long and the Rename.cmd can't rename the file because it's still used by the Unzip.cmd.

So I want to add some command to check for the end of the Unzip.cmd.


A:Solved: Batch file to check if a process is finish?

Read other 10 answers

I was wondering if you gurus can give me some direction...

I run a Specials Menu on a large LCD TV at a restaurant using powerpoint. There are two specials files (lunch.pps and dinner.pps)
When this system reboots, i want a batch file to determine which powerpoint file to open based on what time it is.

ON BOOTUP: For instance, if it's anywhere between 11am and 3pm, open the lunch file. If its any other time, run the dinner.pps file. Make sense?

Im already running a scheduled tasks application that shuts down one and starts up the other based on what time. This works very well. Problem is, i frequently Remote Desktop into this machine and make changes. Once those changes are made, i have to reboot the system. I then want this batch file to start the appropriate presentation since the scheduled task application only works when it sees 11am or 3pm (as in the example above)

I figured since you can determine time and date within a batch file, can't you do an if /then/else type script within a batch? (if its *this time* then load THIS application)

Does anyone know what the syntax is to do this?

I appreciate any help! Thanks!

A:Batch File: Check time, load which program?

What changes are you making using remote desktop that require a reboot? If you are just making changes to your pps files, that certainly does not require a reboot.

Read other 1 answers


I need a batch script that reads 2 file names from folder "A" and then checks if they are located in folder "B". And if they are present in folder "B" then they needs to be deleted from folder "B".

How is the best way to do that ?

Any help i greatly appreciated


A:Batch help: Get file names and check if exict in diferent folders

How do we determine what the 2 files are? Are these 2 files the only files in Folder A? Are they always the same file name?
This is a rather easy batch file once we know that.

Read other 3 answers

I have an HP Envy 17 notebook. My notebook has 2 hard drive slots. It came with 2 500 GB HDD's. I decided to re vamp my laptop when I got it new. I put in a 40 GB SSD as my main drive. Desiganted as the C: Drive. I didnt have money for anything larger and I had my mind set on having a fast SSD instead of a normal HDD. I also put in a 320 GB Hard drive as the secondary drive. Its my E: Drive.

I also put in 8GB of Random Access memory. It came with 4GB. I then Installed Windows 7 Ultimate to my 40 GB SSD. I had about 7 GB left after installing. I just wanted a fast boot up. And I wanted Windows to run fast and smoothly.

Awhile later My SSD started having space disappear for no reason. I wasn't installing anything new on the drive, nor was I saving anything extra to it either. The extra 7 GB dwindled down to about 200 MB. Now my notebook is always running on low disk space. I have tried removing unwanted programs. I also tried clearing out cookies, history and my cache. Even tried removing system restore and shadow copies. And also tried the windows disk cleanup utility.

Does anyone know why my SSD started to have space magically vanish? I would like the space back. And can anyone give me any other ideas on how to free space on the drive? Any tips would be greatly appreciated.

A:Running out of hard drive space. Need info on how to clear up much needed space.

Probably windows updates that have been downloaded. 40GB is pretty small for Windows 7. You could running through the disk cleanup utility located in START>PROGRAMS>ACCESSORIES>SYSTEM TOOLS

Read other 6 answers

How do I put the hard drive space used and free space on the Partition C: ? Partition D:\ and Partition E:\ has it but for some reason drive C:\ is missing it doesn't say how much space is used and how much space is free. The GBs are missing

A:How to bring back the amount of free space and used space on a hard drive

I'm a little confused about your question

You can't see how much drive space you have left when viewing your C drive via My Computer, or similar?

If you right-click on My Computer and select Manage, when the new window pops up click on Disk Management from the left hand side. What does that tell you about C drive? Assuming your C drive is actually a hard drive (and not a CD drive or something, though I have never heard of this happening and don't even know if it's possible to have C as your CD drive), you should see details at the top of the screen such as how much space you have left, by percentage of total capacity, as well as GB

Read other 9 answers

Hey guys,
I'm having a big problem with my hard drive space. First of all it keeps decreasing for no apparent reason when i am connected to the internet even though i'm not downloading anything. And i'm not talking about mb but GB!! My first guess was a vius so i ran my antivirus (avast) and removed some issues, but the trouble continues... I installed the WinDirStas as i saw in other posts to find if i missed something. And to my surprise i discovered that my HD is occupied by ~80GB of unaccessible files! I'm not sure i am saying that correctly so see for yourselves...

A:Hard drive space decreasing and showing less space available

I think you should read as 8 point 8... but you do need more overhead for Windows. Look at your pagefile settings in System and maybe have a look at what Windows Indexing settings are...

Read other 2 answers

Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can...

First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg.

Here's the code that I'm using:

ffmpeg -i folder\video.mp4 -f mp3 -ab 160000 -vn "\different folder\music.mp3"

what I would like to do is add to this so that I don't have to write out this code for every file I have... :/

I have the mp4 files in one folder and than the mp3 files are saving to another folder.

So here's an example of what the code will do if it isn't clear yet.

Folder 1:


what it should do is grab video1.mp4 and convert it.

ffmpeg -i folder\video1.mp4 -f mp3 -ab 160000 -vn "\different folder\music1.mp3"

and than move onto the next one

ffmpeg -i folder\video2.mp4 -f mp3 -ab 160000 -vn "\different folder\music2.mp3"

and than the next one

ffmpeg -i folder\video3.mp4 -f mp3 -ab 160000 -vn "\different folder\music3.mp3"

It's going to have to grab the name from the mp4 file and insert it for the mp3 file.

I can get around pretty good in cmd if it's basic commands but when it comes to something like this I'm a little confused...

Thanks for the help in advance!
I'll see what i can do about searching some more on what I would have to do and if I find the solution I'll post it here if it isn't already answered.

A:Batch File that grabs file names from folder to insert into batch file

A DOS "for /f" loop should do the trick, although changing the filename extension for the output to do everything in one line escapes me at the moment.

Perhaps you could do a dir .\folder\*.mp4/s/b > mp4s.txt, then make a copy of that and edit each line to rename the file to the destination name, and save it as mp3s.txt. Then you just feed both the source (mp4s.txt) and destination (mp3s.txt) filesnames into the for /f loop which handles the ffmpeg conversion.

Quite a crude solution and you'd have to handpatch the destination filenames, but i can't think of how to get a source mp4 filename and then just change the extension.

Read other 3 answers

I want to check a particular windows user rights assignment local group policy applied or not through batch file in windows xp

the policy's are Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Deny log on through Terminal Services Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Allow log on locally Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Debug programs Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Log on as a service Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Perform volume maintenance tasks Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Bypass traverse checking Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Log on as a batch job Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Add workstations to domain Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Modify firmware environment values Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Enable c... Read more

Read other answers

I have a question  that how to copy file from remote desktop user drive to my local machine using  xcopy or any other protocol.

This is my server path "\\Trail01" and here is the file location "c:\Users\ashique.sheikh\Desktop\Day2.R"
How can i give this is in my batch file. I have used this
net use "\\Trail01" "[email protected]" "/USER:ashique.sheikh"
XCOPY /Y \\Trail01\c:\users\ashique.sheikh\Desktop\Day2.R  "D:\VMI"
But its not working. It is give path error.
How can i download this or is there any other way to do it?

Read other answers

Hi, i have hp pavilion g6 laptop and its upgraded from windows 8 to 8.1 then windows 10.  From last few days i was getting "Memory_Management", "Kernel_Data_Inpage_Error" and so many other errors with blue screen. Due to this i have to power off the system from main power button by holding for few seconds. Now i was getting hang problem. I saw in task manager that DISK UTILIZATION was 100%. I did a hardware test where i got below results : HARD DRIVE SHORT DST Check : WARNING HARD DRIVE Optimized DST Check  : FAILEDFAILURE ID: 9U3UWX-6KT85B-MFPWWJ-61Q003 Can anybody tell me how to resolve this or i need to replace the hard drive. -ThanksPankaj 

A:Hard Drive Short DST Check : WARNING and Optimized DST Check...

Yes you need to replace the hard drive. Since you have upgraded to Windows 10 it is very easy to get recovery media directly from the Microsoft Media Creation Tool. For most people, the problem is not physically swapping out the hard drive, but restoring the operating system since they do not have recovery disks. Post back if you want a service manual and/or video showing the replacement, purchase options for a new hard drive and step-by-step for restoring Windows 10. We would need the full model...g6-???? 

Read other 2 answers

Hello, My PC is disk usgae is at 100%  and somtimes the CPU usage jumps up to. I tested my system and recived- Hard Drive Short DST Check and Long DST Check: Warning  How do I determine what the warning is? Do this mean my hard drive is on the verge of failing? 

Read other answers

Had this laptop for about 6 years, had a few issues in the past, but nothing major like this. After, I ran a system dianostic, the result shown that the Hard drive short DST failed. Not totally sure how to do a recovery, I do have the Recovery Discs, so I searched up how to run the discs; turned on the system- press f11-  window loading files- window starting- then it just stuck on a window blue screen with nothing but the cursor. Can I even use the Recovery Discs? I want to replace the old HDD with a new SSD, but I'm not sure if I have to install a new OS or can I recover the old hard drive OS and transfer to the SSD?

A:Hard Drive failure (Hard Drive Short DST Check: Failed)

DST:Fail means  the hard drive has failed and will need to be replaced. If you are still in warranty HP will send a replacement. If not a retail laptop SATA hard drive can be used. Just be sure to get one of at least equal capacity as the original in order to use Recovery Discs. It can be larger, but not smaller capacity.For instance if you have a 500GB hdd you could use a 750GB hdd but not a 320GB hdd.

Read other 1 answers

I need a batch file which auto copy files from any USB drive when it connected to a folder in the hard disk .

A:Autocopy Batch file from usb drive to hhd ?

The problem trying to do that is the USB drive may have different drive letters assigned at different times so the batch file would need to be able to find the USB drive in order to copy from it.

You may be able to do this with PowerShell or VB Script but I don't know how to do so.

Read other 1 answers

hi there..

my name is Anis...i just bought external hard drive 500gb...but after I formatted it..it's just about 400++ gb can be used..i would like to know..how to use the extra/reserve space for my ext hard disk?by any means, i want to fully use my 500gb space for the external...please help me...thank you...

A:How to fully use the extra hard disk space for external hard drive?

It should have about 465GB, what are you seeing?

You will not have 500GB due to the conversion between binary and decimal for reporting sizes.

Read other 1 answers


I'm not terribly dos-literate, but I did manage to create a batch file to substitute a drive letter for a folder. I created a file in notepad that read: "subst Z: C:\Animation" and saved it as z.bat in C>Documents and Settings>All Users>Start Menu> Programs>Startup. I got the majority of the artists on my project to do the same.

Two have not been able to do so. They create the file, but no "Z" drive is created on startup.

Both are using upgrade versions of Windows XP from previous versions.

Any suggestions on how they can get this "virtual z drive" up? In order for our project to be successful, all artists need to have the same file structure.



A:batch file to substitute drive letter in XP

Does z.bat try to run for them when they login? Are they getting errors?
Does it work for them if they double-click the file directly? I'm wondering if they saved the file as z.bat.txt or something.

Read other 3 answers

Hi all,

To increase our backup solutions, we have decided to backup our SQL database every hour to a folder within the C drive (we couldn't get it to backup straight to a USB drive). So now we need a way (batch file best solution?) to copy these files to the USB drive, lets say every 1.05hours just after they've been created?

Maybe we could copy the entire folder every hour and delete old backups that are in this folder and to the new place for the backups. (although I guess it won't work as it'll have the same folder name once it has been copied).

Or copy the individual files to that new folder although with this they have all different names so is it possible to copy the newest file to the new folder and then after this delete the old backups from a certain time frame?

Big thanks for your help!

A:Batch file to copy files from C drive to USB

REM Creates a Backup of files every hour
@echo off
XCOPY <source path> <destination path> /w /f /-y
TIMEOUT /t 3600 /nobreak
goto start
This might work, I'm no expert by any means, but the batch file should copy all the files, and then pause for a hour, and then loop back to the start and complete the same process again.

Here's what the XCOPY switches mean - http://www.microsoft.com/resources/d....mspx?mfr=true

Read other 9 answers

Ok first let me give you some background, I have a program that will only pull information from the D: drive letter. The problem is that the files it runs are stored on a network drive, and I can't burn a copy of these file onto disk to use with the current D: drive because the files update daily.

Now what I'm looking for is a way to change the cd rom drives of 312 machines from "D" to another letter so I can map the D: drive to the network folder of these files.

If anyone has a better idea to solve this problem than changing the drive letters I would be open to that as well.

Thank-you in advance.

A:Changing Drive Letters With a Batch File

See the "diskpart" program and the "select", "remove" and "assign" subcommands.

Read other 1 answers

I have a system and 3 internal hard drives.

The drvies are 120GB, 160GB, and 180GB but my system only recognizes 111GB, 149GB, and 167GB respectively. Tha tis about a 7% loss of space for each drive. 33 gigs lost in total. That's a lot of space.

None of the drives are partitioned and it's not and HP or other like system. It's a custom built PC. I only have an OS (WINXP) installed on my C drive (the 160 GB drive).

No matter how I connect these drives (on-borad IDE or IDE controller card) my system will not recognize the full space of any hard drive I install on my system.

The 120 is slave to the 160 and the 180 is on an ATA controller card (Promise Technologies) all by itself. All are Western Digital. The 180 is a special edition (and I recommend you stay away from WD special edition HDs. I have had to swap it for a refurb 3 times in 1.5 years. This is the first time I have installed it on a newer computer, though, so I hope it does not break like it did on my old, ancient system 3 times. My old system was and AMD 850 Duron with 128M RAM..but I digress).

So is there a way to get back this 33 gigs of missing HD space or is this just the way it is with WINXP?

Thanks in advance.

BTW, my MB is an ASUS P4P800SE with a Cerleron D 2.4MHz in case any of that matters.

A:7% of hard drive space lost on ALL hard drives...

Read other 16 answers

I have a few questions about my simple batch to copy a Outlook pst file to an external drive. First, robocopy doesn't copy my file; Second, is there a way to prevent the taskeng.exe window from appearing; and Finally, I tried the command "copy" instead and it copies the file but the taskeng.exe window "hangs" and does not continue to restart outlook and therefore close on its own. By the way, the pst file is over 4Gb. Any help is appreciated, thank you!

:: Backup pst file to Server external drive
@echo off
setlocal EnableDelayedExpansion
start "" "C:\Program Files (x86)\Microsoft Office\Office12\Outlook.exe"
taskkill /im outlook.exe /f
@ping -n 5 -w 1000>nul
@ping -n 5 -w 1000>nul
robocopy "C:\Users.pst" "\\SERVER\Outlook Backup\user.pst"
start outlook.exe

A:Batch to copy Outlook pst file to external drive

Read other 6 answers

Hi all,
I am new to Scripting so i need you people help.
I need a batch file to stop a service in services.msc and replace the .afxm file in c directory with with latest .afxm file
and start the service which stopped at first.

Read other answers

I have a usb that I copy files from to new computers. I do this all day and would like to make it quicker.
I will have an XP path and a Vista/7 path, but just worried about XP right now.
The problem is I don't know what drive letter the USB will be in. I thought there was a %thisdrive% switch of some time.

In addition it has spaces and I don't know how to replace spaces in the path. Here is an example;

copy f:\install\105 wallpaper\*.* c:\documents and settings\All users\Shared Docuemnts\Shared Pictures\

Determine the USB drive letter?
bridge space issue?

A:batch file to copy from usb- unknown drive letter

Read other 8 answers

I would like to embed diskpart command with my batch file.

for example "gpupdate.bat" is my batch file

@echo off
@echo off
cd: c:\windows\system32
gpupdate /force

I want following commands to embed with above batch file (or seprate batch file.)

list vol
sel vol 1
remove letter=E
I've tried the following method (detail below) but it DIDN'T WORK

create text file "removeletter.txt" with following commands

list vol
sel vol 1
remove letter=E

open command prompt 
c:\users\Admin diskpart /s removeletter.txt

nothing happens

but when I do it manually it works
cmd -> diskpart-> list vol-> sel vol 1=> remove letter=E 

Thank you!

Read other answers

I am using this command:

mount -u:root -p:[I][password][/I] \\\srv\www\htdocs g:
at the command line to mount an NFS-enabled network drive from my Windows 7 machine.

I need to know what I need to put in a batch file (which will be put in my Startup folder), so the drive is automatically mounted at login/startup.

I tried just putting the line above in a batch file, but that didn't work.

Thanks for anyone's help.

A:How to Create Batch File to Mount Network Drive

Read other 16 answers

create a batch file to format c drive on restart



is it possible to create a batch file to format c drive on restart ?

if so

how would you create it

system im am wainting to try this on is windows xp..


Read other answers

Hi everyone,
I installed Ubuntu on my computer a few months ago and created another partition for it on my 1TB hard drive.

I didn't really care for Ubuntu so I decided to delete the partition it was on.
That might have been a mistake.

Well, now there's 87.68GB of free space on my hard disk that I can't use and I don't know how to add it back to my c: partition.

There was another post about this a couple years ago, but I don't understand the instructions and am not actually sure if it worked. Can someone explain how to do this, please?

I'm not completely computer illiterate, but I'm not familiar with partitioning disks. It was just the one time with Ubuntu.

A:Hard drive partition: adding free space back to c: drive

The unallocated area is actually an empty extended partition. You need to delete that first.

Read other 2 answers

This problem is very vague being that i'm over the phone with my father trying to solve this problem. What's happening is that on the startup, the mapped drive doesn't auto connect. The drive is shown with a red x, you double click it and it asks for the password and it is being remembered most of the time (but sometimes not). But anyways I have followed the directions Microsoft offer (http://support.microsoft.com/kb/q243486/) but I do not know what to have my father add in to the batch.

He has something there now that includes the user and password. What else it intails i'm not sure. BUT is there a batch out there specifically for this?

A:Solved: I need a batch file that connects to a mapped drive on start up

Typically it would be something like:

net use X: \\server\share

where server is the name of the computer you want to connect to and share is the share name.

Then just put the batch file or a shortcut to it in the user's startup folder.

Read other 3 answers

I've created a Batch "backup" file that is schedule to run nightly to a USB External Hard Drive. (works great)

Issue sometimes the USB drive letter gets switched if a user pulls out and/or puts in another USB storage key or other device. How can I set up the batch file to access the right USB drive letter?? In this case the Drive is either "G" or "F".

Here's a sample Backup Batch file - using xcopy

@echo off

@For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Day=%%A
Set Month=%%B
Set CANYear=%%C
Set USYear=%%D
Set US_DATE=%%D%%B

echo ###############################
echo ####
echo #### Backup Control File
echo ####
echo ####
echo #### Canada Date = dd / mm / yyyy (A=dd, B=mm, C=YYYY)
echo #### US Date = Weekday mm / dd / yyyy (A=day, B=mm, C=dd, D=yyyy)
echo ####
echo #### Note: Date is determined and the Year and Month are added to the end of the backup file name
echo #### This way it keeps monthly backups and keeps overriding the current Month until the end of the month switch
echo ####
echo #### Backup - Started
echo ####
time /T
date /T
echo ####
Echo ####
Echo #### xcopy switches
Echo #### /s Copies folders and subfolders except for empty ones.
Echo #### /c Continues copying even if errors occur.
Echo #### /i If the destination does not exist, and you are copying more than one file, this switch assumes that the destination is a folder.
Echo #### /q Doe... Read more

A:Solved: Batch File Backup when USB drive letter switches

Resolved - In my mind anyways

I added a If Exist clause

IF EXIST F:\Backups (
Echo #### File Found - Backing Up to F: Drive
Echo ####

IF EXIST G:\Backups (
Echo #### File Found -Backing Up to G: Drive

Echo #### Backup Drive Not Ready

ECHO #### F Drive Exists
ECHO ####
xcopy "C:\Test" F:\Backups\Test\Backup%CAN_DATE% /k/i/y/s/f
ECHO ####

ECHO #### G Drive Exists
ECHO ####
xcopy "C:\Test" G:\Backups\Test\Backup%CAN_DATE% /k/i/y/s/f
GOTO ENDClick to expand...

Read other 3 answers


is it possible to create a batch file to format c drive on restart ?

if so

how would you create it

system im am wainting to try this on is windows xp..


A:[SOLVED] create a batch file to format c drive on restart

Seems to me there are a thousand underhanded reasons to do this, and none that are legit.

I'm closing this thread.

However, YB, if you do have a legitimate reason please PM me.

Read other 1 answers

This is definitely a long shot, but can you partition unallocated hard drive space as a separate drive with it's own drive letter?

A:Unallocated Hard Drive Space to Separate Drive

format the space and it will have it's own partition letter

Read other 3 answers

On a Windows 7 machine, have the OneDrive and Dropbox folders on a separate 150GB hard drive, E:.  When I open Computer, it says my E drive only has 500MB available, when I highlight everything on the E drive (i have hidden files and system files visible)
and do a properties it only adds up to 65GB of data. 
I ran a chkdsk on E and it didn't find any issues.  How can I reclaim my 85GB (150-65) of "lost" space back?  Or how can I figure out what Windows thinks is using it.

Read other answers

My old Seagate 1TB hard drive was filled to 780GB out of the 1TB. Since I was getting close to filled I upgraded to a WD Black 2TB. I used the Windows 7 back up to create a complete system image. I replaced the hard drive with the WD then did a system restore from the image. Everything works fine and everything looks exactly the same except the new hard drive is only showing 322GB used out of the 2TB. I now have both hard drives in the computer and opened up the contents side by side, they both contain the same files and folders. The 1TB drive is showing 780GB used and the 2TB drive is only showing 322GB used. Am I missing something here? Shouldn't they both have the same amount of space used?

A:New hard drive using less space after image restore then old drive?

I think it only copy your operating system drive to your new disk?
You can check your disks in Disk Management. And also you can create new volumes there.
Right click on Computer - Manage. You will see Disk Management.

Read other 7 answers

I have a micron comp with WinxP and 2 hard drives , and thru the years I have put a lot of programs in my D drive. After the nightmare, SP2 problems and I finally got it to work. My C drive show only less than 1 G, the hard drive is 12 G. My other D 30 G's and it has 22 G's left. So, I have tried to uninstalll programs on my C drive and it keeps coming up with an error message, cant unistall b/c missing a file.

What can I do to empty my C drive and transfer my programs to the D drive?

A:Running out of space in my C drive and I have another physical Hard drive

Read other 16 answers

Hello all,
I've recently moved my media hard drive to an external for greater portability. I've noticed that whenever I restart my machine or cycle the power on the external all the drives are set to a Write Protection mode.
I've set the security settings to give all users administrative access, but it still sets it to readonly.
I've restorted to using the CMD to remove the protection manually, but I'm looking for something more permanent or simple.  I've little to no experience with Batch files, but my old room mate used them extensively and the idea came to mind of using
one to reset the readonly status of the partitions.  
I use the list of commands in CMD here
Then I repeat this for partitions 4-7.  
If anyone knows a permanent solution or can show me the script/commands to type for a batch file I'd be very thankful.

A:Win7 Write Protection removal for external hard drive and batch files



You could run the command to unlock the external hard drivers. The commands are correct. When running the batch file, please right click it and run as administrator.


Regarding the Write Protection issue, please check if there is any jumper which is located next to or near the cable connector port to set write-protect mode. Also,
check the BIOS setting and see if the following method could fix the issue.


In Device Manager, right click external hard drive, Update Driver Software, clicked on the Browse, in the List option, and chose the "Standard Dual Channel PCI IDE


More helpful information



Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.


Best Regards,

Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Read other 3 answers

If someone can Please help, I just need the Data in the XML tag extracted to Batch File Variable....the rest i figured out and works great for the backup...just need the extracted tags...
thank you

i have a parent directory that contains a sub directory and a XML file that i need a batch to read 2 specific tags then create a Set command in the batch with those 2 lines to create a backup folder with the tags as the names and such. looks like this:

Parent Directory = XML
XML Folder contains > WJFKB02229001.D Folder & Config.xml File

I need to read the contents of the xml "Config.xml" extract the PhaseID Tag data "WJFKB02229001"
Also need to extract the BoxID "D", I don't need anything else on these seperate lines.

keep trying the following For /F command but no luck
[COLOR=red]for /f "tokens=1 delims=[" %%G in ("PHASEID" %path%\%myfile%) DO ([/COLOR]
[COLOR=red]set PhaseID=%%G[/COLOR]
[COLOR=red]echo Phase: %PhaseID%[/COLOR]

and i've searched so many sites and forums with no real help on this one....the data is contained in the xml, weird enough i guess that it's enclosed in brackets "[", which all the forums i read and try it either replies with a blank variable being passed or says it can't find the file at all....



Set PhaseID="[COLOR=red][B][I]Extracted PhaseID from xml[/I][/B][/COLOR]"
Set BoxID="... Read more

A:Solved: Batch File Extract TAGID to Batch Variable? weird

Read other 16 answers

I am trying to move all my files from my computer to my new external hard drive, but whenever I try and move a file over 4 GB in size i get this error message...
"The file is too large for the destination file system"... anyone know how I can get around this so I can move those files over?

A:Problem transfering large file from hard drive to external hard drive

Get ahold of some software that will break up the file into chunks.

Read other 1 answers

Hi, i have a problem with my hard drive. It is a 75 gig HD but all i have left is around 10 gigs. When i highlight everything in my HD it only comes up to around 21 gigs... i was wondering if i could recover any more gigs. Any ideas would help, thanks ahead.

A:~Hard Drive Space~

Any chance of a screen shot from disk management if your running xp weirdo?

Read other 1 answers