Over 1 million tech questions and answers.

how to batch select and batch delete

Q: how to batch select and batch delete

Hi I have a windows vista 32 system and I would like to know how batch select, or find files, sharing a common text feature in the title and then delete that feature.
to be clear, say I have a number of file archives taken from various sources and although they are easily identifiable and searchable they all share the same feature in the title, i.e. a number.
So I have the following:
01 the cramps - you got good taste
01 white rabbits - percussion gun
09 yo la tengo - return to hot chicken
01 the pipettes - real feelness
03 the gossip - standing in the way of control
12 mc5 - kick out the jams
what i would like to do is identify the files with numbers in them, at the start of the file name, and then delete them: the numbers not the file. If i can't identify numbers in general then identify the files by '01,' and then remove the '01' from all the files that have it at the start of the title
I am trying to organise my music files, and I have a program called 'Dr Tag' which does this, but not with the file extension '.OTS' which is specific to the application i want to use the 'OTS' files in.
I use the 'everything' search application from void tools, and if i type in N:/*.ots 01 that will identify all instances of file names that have '01' in the title anywhere in that disc drive, but of course unless I go through each file individually and change the name by hand, its not really a help.
So could someone suggest a freeware app that will do this, or even a payware one, but I would prefer a freeware one.
Thanks for you time
margott

Read other answers
RELEVANCY SCORE 200
Preferred Solution: how to batch select and batch delete

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.)

RELEVANCY SCORE 82.4

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
Code:
[COLOR=red]for /f "tokens=1 delims=[" %%G in ("PHASEID" %path%\%myfile%) DO ([/COLOR]
[COLOR=red]set PhaseID=%%G[/COLOR]
[COLOR=red])[/COLOR]
[COLOR=red]echo Phase: %PhaseID%[/COLOR]
pause

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....

PLEASE HELP, lol

Code:

:StartSet
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
RELEVANCY SCORE 79.6

Hiya,

I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups.

Two questions:
1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd rather keep a standard 'workflow' for other users who use the machine.

2. I'm 'ok' with batch files, but i've never tried to mirror to a different folder each time (automagically). What i'd like to do is have it backup a folder and call it "blah.1" then "blah.2" each time it is run, and then repeat once it gets to "blah.9" so it doesn't keep growing forever. I don't know how to do this.

I realise no.2 is not really for this forum, but someone might know and i might as well ask

Thanks.

A:How to run a batch file at logoff & some batch scripting help please

I found an answer to the logoff/shutdown:
How to schedule a task to run when shutting down windows - Stack Overflow

And the batch file folders:
robocopy - Insert current date in to destination folder structure - Stack Overflow

Read other 1 answers
RELEVANCY SCORE 77.2

I made some batch files so i can run some Java programs. After closing the program and making sure Java was closed i attempted to delete the batch file, only to be greeted by my faithful fiend, the "File In Use" dialog window. When that came up i simply searched the file in Process Explorer and found that it was being used by "AVGIDSAgent.exe." Long story short, i had to completely disable AVG in order to delete the batch file. I'll be working with java applications that use batch files to start, so is there a definitive way to keep this from happening again?EDIT: I moved this here,so you may get a better answer.AntiVirus, Firewall and Privacy Products and Protection Methods

Read other answers
RELEVANCY SCORE 77.2

is there a command available ? my workaround is to rename donotdelete.exe to donotdelete.bat; run a batch file to delete all *.exe and then rename donotdelete.bat to donotdelete.exe is there a more elegant solution ? tia
 

A:Batch file to delete all *.exe except for one

Read other 7 answers
RELEVANCY SCORE 77.2

Hey All, I just joined this forum to find some help on a specific topic that I've been researching for like two hours now on google. I have a list of 1000 files that I need to delete from location.

Thanks in advance

A:DELETE batch using list.txt

Hi and welcome to SF.

Here's your batch file. It assumes your List.txt is newline separated.



Code:
:: th-378655.bat [TxtFileList]
@echo off
REM Delete files/folders specified in a newline delimited txt file list.

set "default_list_path=C:\Users\%USERNAME%\Desktop\ListOfFilesToDelete.txt"

if not "%~2"=="" echo Error: unexpected arguments& exit /b
if not "%~1"=="" ( set "list=%1" ) else (
set "list=%DEFAULT_LIST_PATH%"
)

if not exist "%LIST:"=%" echo Error: list could not be found& exit /b

set /a delete_counter=0
for /f "delims=" %%I in ('type "%LIST:"=%"') do (
if exist "%%~fI" (
set /a delete_counter+=1
if exist "%%~fI"\* (
rd /s /q "%%~fI"
) else (
del /q "%%~fI"
)
) else (
echo No such path "%%~I".
)
)

echo.& echo %DELETE_COUNTER% files or folders were deleted.

Read other 2 answers
RELEVANCY SCORE 77.2

Hi All,

I am trying to do one batch to delete all the temporary files in the machine and save one log of the space removed and/or the removed files.

Now I have the steps to remove the temporal files
==
@Echo off

IF EXIST c:\windows\temp\ del /f /s /q c:\windows\temp\
IF EXIST c:\windows\tmp\ del /f /s /q c:\windows\tmp\
IF EXIST C:\tmp del /f /q C:\tmp\*.*
IF EXIST C:\temp del /f /q C:\temp\*.*
DEL /f /s /q %temp%\
DEL /f /s /q %tmp%\

IF EXIST "C:\Users\" (
for /D %%x in ("C:\Users\*") do (
rmdir /s /q "%%x\AppData\Local\Temp"
mkdir "%%x\AppData\Local\Temp"
)
)

IF EXIST "C:\Users\" (
for /D %%x in ("C:\Users\*") do (
rmdir /s /q "%%x\AppData\Local\Microsoft\Windows\Temporary Internet Files"
mkdir "%%x\AppData\Local\Microsoft\Windows\Temporary Internet Files"
)
)
@Echo off
==

any one could help me in how I could save the log ?
 

Read other answers
RELEVANCY SCORE 77.2

Need:
Hello, I am looking for a "simple" batch file that will delete any folder in the root of the drive, that is older than "x" days - but not the subfolders.

Setting:
My client insists on saving her data onto a large USB drive. I schedule a batch file to run similar to this:

md "G:\BACKUP\%DATE%"
robocopy /mir C:\Data "G:\BACKUP\%DATE%\data"

When run once a week it puts a copy of "data" into a folder under G:\ named after the date it runs.
i.e. "G:\BACKUP\Fri 04-24-2009\data"

In 12 weeks the drive is full. I need a script that will delete any folder - in the root - created more than 90 days ago; this way my drive won't overfill. I do not want to delete sub folders older than 90 days cause most of the data in the sub folders are older that 90 days.

This allows the client to have 3 months worth of backups at one week increments. Please no VB Scripts, I've seen them and they are to complicated for me

BTW to get the %DATE% variable to look like the above, you need to change the date separater in control panel to a hyhpen from a slash.

TIA

A:Need batch to delete folder by age

This would be really simple if you first convert the date to a YYYYMMDD format (or YYYY-MM-DD) and use that to name the folders.
That way they would always sort in chronological order, and all you'd have to do is a simple For loop that does a Dir with newest first, skip the first 12 folders, and delete the rest.

As you've created the folders with the date in the name we can check that date, so the date of any of the Data won't matter.

This will do what you want. It will search all the folders in G:\Backup, check the date in the folder name, then present a list.
You can delete all, none, or be prompted for each folder.
If you just want it to run and delete all, that part can be commented out.
Always best to test with sample data first though.

The file contains a tab character, and some long lines. The tab can't be copied off the forum, and the long lines sometimes get split, so I've attached the file as a Zip.
Modify the blue lines to change the path or number of days to keep.

Code:
@Echo Off
:: Set the next variable equal to tab followed by a space
:: If you copy this code, you will have to manually edit this line
Set _TabSpace=
Setlocal EnableDelayedExpansion
:: User Variables
:: Set this to the number of days you want to keep
Set _DaysKept=90
:: Set this to the folder that contains the folders to check and delete
Set _Path=G:\Backup
:: Get todays date
Call :GetDate
Set _yy=%_fDate:~,4%
Set _mm=%_fDate:~4,2%
Set _dd=%_fDate:~6,2%
:... Read more

Read other 5 answers
RELEVANCY SCORE 76.4

Hello All.

I am trying to create a batch file that calls other batch files (device simulators).

The problem I am having is the batch file will not continue until the the call terminates, is there a way to continue it after the call (the batch only terminates after the user exits the simulator).

Thanks avamore
 

A:batch file: batch within batch

Welcome to TSG!

Use Start. The first set of quotes is for a title. It's needed in case the file name/command needs to be quoted, as in the 2nd example.

Start "" batch.cmd

This will open in a 2nd window. If the batch file you call doesn't use the Exit command that window may remain.
In that case use this instead:
Start "" "cmd /c batch.cmd"
 

Read other 1 answers
RELEVANCY SCORE 76.4

I am looking for a batch file that would delete all cookies, tmp files and all other junk, I have tried several and they all had issues, I need one to do the job regardless who logs in.
 

A:Batch to delete cookies and junk.

Would this work?

Yes, Do the following:

1) Make a folder on your desktop called "Xen".

2) Go to www.x9000.net. Don't be fooled by the name.
Direct download for Xen: www.x9000.net/downloads/xen.zip

3) UnZip the Xen file and extract everyfile from Xen.zip into the Xen folder.

4) Open the Xen folder and click on Xen.bat file.

5) A program should pop-up. Just wait, it takes a second to get running sometimes, since it has to figure out your system information.
6) Just play around with it, press "b" to delete all temp and internet files and "c" to delete all cookies. I am really happy with the program. Remeber, pressing "x" on the keyboard exits the program.
 

Read other 2 answers
RELEVANCY SCORE 76.4

Has anyone here ran into any utilites that will allow me to do batch file delete or batch file paste to specified machines machine on my network.
 

Read other answers
RELEVANCY SCORE 76.4

I would like to create a batch file to delete a specific folder. The folder is PGP Corporation. When I try to execute del PGP Corportion it is really trying to delete a folder called PGP. It isn't seeing that PGP Corportation is the entire file name because of the space. Do you know what I need? Thanks for your help!

A:Batch file to delete folder

Values with embedded spaces need to be quoted. Also, you can't just use the del or erase command for directories. You need to use the rmdir (remove directory) command.

Like this:

rmdir /s /q "C:\PGP Corporation"

Read other 8 answers
RELEVANCY SCORE 76.4

can u provide me some batch file codes to delete user accounts in winXP using batch file? using batch file to edit or delete registry entries.

A:How to delete accounts using batch file?

Why would you want to create batch files to delete user accounts? I can not think of any legitimate reasons for this, please explain???

Read other 6 answers
RELEVANCY SCORE 75.6

Hi,
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
RELEVANCY SCORE 75.2

Can anyone tell me why this line in my batch file won't execute?:

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders /v ?C:\\Program Files\\UltraVNC\\? /f

I get this error:
ERROR: The system was unable to find the specified registry key or value.

I've tried tried it several different ways with quotes, without quotes, and with 1 \'s. I've verified the key is there and I'm running as administrator. Thanks.
 

Read other answers
RELEVANCY SCORE 75.2

Hello!
I have a question I have two batch files on my desktop that were created by Microsoft Technician(while accessing my PC remotely). Technician couldn't fix the problem with failed update for Microsoft works 9. I had problem with installation of Security Update for Microsoft Works 9 (KB2092914). Now, the problem IS FIXED. i applied another update,http://go.microsoft.com/?linkid=9737449 which took care of the failed installation.
My question, is that safe to delete windows batch files?There are two icons on my desktop. White background with an image of circular tool. 2.93kb size.
 

A:is that safe to delete windows batch files?

Would be interesting to know what code is inside them. Right click them and chose edit from the context menu. Copy and paste the code here.

Shouldn't be a problem if you delete them
 

Read other 3 answers
RELEVANCY SCORE 75.2

Hi friends,

Please guide me how to create a batch file to fit this scenario,

"I have a Folder Named Addons which has 110 Folders which themselves has many sub folders and files of differnet extentions for eg(C:\Program Files\OpenERP\Addons). In this I have to leave around 15 decided Folders and their contents in Addons. I have delete the remaining Folder and its contents. The Number of folders and Their Names may vary every time depending on the Computer.

I have to use batch file both in Windows XP and Windows 7.

I am new one to create batch files. Please guide me.

A:Batch File To delete Specific Folders

Let's say of the 110 folders in the AddOns directory and 10 are dedicated (not to be deleted).

Are those dedicated folder names constant? (they are never changed?)

Read other 3 answers
RELEVANCY SCORE 75.2

I have been trying to delete these reg entries by creating a batch file. I first tried it as a reg file by just putting a dash in front of the lines as suggestion on line. It didn't work. Then I tried to create a batch file, the following are the keys I want to delete:
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{211 2AB0A-C86A-4ffe-A368-0DE96E47012E}]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{211 2AB0A-C86A-4ffe-A368-0DE96E47012E}\\PropertyBag]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{491 E922F-5643-4af4-A7EB-4E7A138D8174}]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{491 E922F-5643-4af4-A7EB-4E7A138D8174}\\PropertyBag]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{7b0 db17d-9cd2-4a93-9733-46cc89022e7c}]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{7b0 db17d-9cd2-4a93-9733-46cc89022e7c}\\PropertyBag]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{A30 2545D-DEFF-464b-ABE8-61C8648D939B}]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FolderDescriptions\\{A30 2545D-DEFF-464b-ABE8-61C8648D939B}\\PropertyBag]

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows... Read more

A:Creating a batch file to delete reg entries

When you say batch file what do you mean a batch file is .bat which runs command.com you need a .cmd file as that runs cmd.exe. you code should work but to test do one line make sure that works use /f not force. How do you run the file if it runs as system the key may not be there

Read other 3 answers
RELEVANCY SCORE 75.2

Hi

I have a batch file which should delete everything under specified folder. the batch file ask the user to specified the folder which then be stored against %vmpath% variable. The following script is deleting every thing including the specified folder but i do not want to delete the specified folder. Sorry i am very new to batch scripting, require some help please.

IF Exist "%vmpath%\EMS96.exe" RD /S "%vmpath%\*"

thank you
 

A:Delete Folder Content with Batch file

Easiest to just recreate the folder after deleting it:

Code:
If Exist "%vmpath%" RD /S /Q "%vmpath%"
MD "%vmpath%
You don't need to specify a file name, unless you only want to delete the tree if that file exists.

If the parent folder can't be deleted and then recreated, you need a For loop to get the subfolder names.

Code:
PushD "%vmpath%"
Del /Q /F *.*
For /F "Tokens=1 Delims=" %%I In ('Dir /AD /B') Do RD /Q /S "%%I"
PopD

I've added a bit more in the following. This first switches to the folder specified on line 2, so the path entered must be relative to that folder. This is to prevent someone from typing C:\Windows and deleting the entire Windows tree. Do Not use C:\, or they can type Windows and delete the Windows tree.
If this will be used by multiple users, and the folders to be deleted are in there profile, you can use the %Userprofile% variable so it will be specific to the current user.

Code:
@Echo Off
PushD C:\Test Dir1
:_Ask
Set /P vmpath=Please enter the Parent Folder name relative to %CD%:
If /I "%vmpath%"=="exit" PopD&Goto :EOF
If NOT EXIST "%CD%\%vmpath%" Echo Unable to locate "%CD%\%vmpath%". Please check spelling.&Goto _Ask
:_YN
Echo All Files and folders contained in %CD%\%vmpath% Will be Deleted!
Set /P _Confirm=Are you sure? (Y/N):
If /I "%_Confirm%"=="N" Goto :_Ask
If /I NOT "%_Confirm%"=="Y" E... Read more

Read other 2 answers
RELEVANCY SCORE 75.2

The batch file I am creating needs a command to create a temporary folder and then delete it when no longer needed. can this be done? How?
 
Bill

A:How to create a folder in a batch file,( .bat) and delete it

 Just use the mkdir command.  For the syntax just type mkdir /? from the command prompt.
 
Good luck.

Read other 3 answers
RELEVANCY SCORE 75.2

I am trying to change the value of a registry key. I want to create a batch file to do this because I have alot of computers that this needs changing on. I figured the easiest way to do this is to delete the current entry and then add another entry that contains the correct value.

So far I have exported the key with the correct value set. This is the one that wants adding after deleting the original. I created the batch file and have tried testing to see if it deletes before i add the code to add the correct registry key. This is what i have.....

REG DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections.reg"

I run the batch file, it brings up a command prompt screen asking Y or N. I enter Y then hit ENTER but the registry key remains.

What am i doing wrong? Also i don't want it to prompt for a Y or N i want it to do it automatically. How do i do that?
 

A:Solved: Batch file to delete registry key?

Rry this:
REG DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /f

You can also use the REG ADD command to change the data in a registry key value, instead of first deleting it. If it already exists, REG ADD will overwrite it.
 

Read other 2 answers
RELEVANCY SCORE 74.4

Hi there,

I have what might be a fairly unique request as I have been searching the forum and haven't found a solution for the type of batch file I am after.

Basically I am looking for a batch file that I can program to look in one Directory on the local HDD, check the contents of that Directory and delete anything (usually sub folders) that are "x" Days old.

Is this an easy thing to do or does it require some thought?

Any advice greatly appreciated.

Dave

A:Batch File Advice - Delete Folders that are x days old

Several options:

windows - Batch file to delete files older than N days - Stack Overflow
How do I delete old files from a directory while keeping the most recent ones on Windows - Stack Overflow
Check several locations in a .vbs script to delete files by date. - computer help forum

Read other 1 answers
RELEVANCY SCORE 74.4

Hi guys,

Looking to this forum for some help with writing a batch file.

I would like to delete 5 day old files from a network share using a sched task .bat to make room for additional daily backups. I have gotten by with very basic batch files before but I really don't know where to start writing this in terms of how to select the 'old' files to delete. The process would also have to include subfolders.

I'd schedule this to run every morning.

The share is, P:\

With many thanks in advance,

Matt
 

A:Delete old files on a network share using batch file

Read other 13 answers
RELEVANCY SCORE 74.4

Hi guys,
I found out recently that the "Hibernate" feature on windows could potentially compromise truecrypt keys, and certain content from an encrypted drive or encrypted virtual partition.

When I found out, I sought to remove the "hibernate" feature from my computer, and remove the "Hiberfil.sys" file that could be potentially holding sensitive information.

Now, you're probably thinking "why would you want a batch script to do that? Its located on C: (windows partition drive), just go there, and delete it!"...
The problem with that, is the fact that I have had windows on multiple drives, of which I have not re-formatted yet, and also have windows XP installed on the same partition as my windows 7 OS.

So basically, I just want to make a batch file, that will work with windows 7, to search for "hiberfil.sys" through a hard drive (I'll just copy the batch file to each partition's root and run it on each partition separately), then delete the file or files if there are multiples of them.

The search will need to include "hidden" attributes, and perhaps include "system" files, and "read only" files in the search too, but not limit the search to those attributes (also include files with no special attributes attached).
I just want to do a good, clean purge of any hiberfil files on any partition.
Anyone able to help me out with this?
 

A:Search for, and Delete hiberfil.sys files using batch script.

If you have several Windows installs, you need to go inside each and disable sleep before you can delete that hiperfil. Maybe it won't let you delete that file when the feature is enabled.
 

Read other 2 answers
RELEVANCY SCORE 74.4

Was infected by the matsnu1 virus recently which encrypes and locks all your data files. Got all my files back by running matsnu1decryp.exe You need an original clean file before the virus struck for it to work out how to decrypt all your other files does does save the day. Down side is that you end up with two files. The the original and a locked version. You can just go through your hard drive and delete the locked files but I have a 1TB disk with thousands of files and folders. Since all the locked files begin with "locked" I was wondering about some sort of batch file that would do this for all folders and sub folders. I am sure I remember doing this stuff years ago with DOS but don't remember enough to try it. Grateful if anyone could let me know the DOS command for this or some other way of quickly deleting many files which have part of the name which is common to all files. They all have different extensions so cannot use that option. My drive is H:

Regards

A:How do I write batch file to delete thousands of files

At this time there is a lot of tutorials to do *Batch files. I recommend looking at Batch File Help and Batch File Commands to try to do do this. But to delete thousands of files, you can just go to your computer security (such as NOD32 Antivirus) and clean the hard drive of the files. It worked for me when I last had that blasted virus (which was a while back). If you still have problems, contact me again and I'll try to help.

Read other 6 answers
RELEVANCY SCORE 74.4

Hello!
I have several questions
1. I have two batch files on my desktop that were created by Microsoft Technician(while accessing my PC remotely). Technician couldn't fix the problem with failed update for Microsoft works 9. I had problem with installation of Security Update for Microsoft Works 9 (KB2092914). Now, the problem IS FIXED. i applied another update,http://go.microsoft.com/?linkid=9737449 which took care of the failed installation.
My question, is that safe to delete windows batch files?There are two icons on my desktop. White background with an image of circular tool. 2.93kb size. looks like Register the Windows Update files
REGSVR32 WUPS2.DLL /S
REGSVR32 WUPS.DLL /S
REGSVR32 WUAUENG.DLL /S
REGSVR32 WUAPI.DLL /S
REGSVR32 WUCLTUX.DLL /S
REGSVR32 WUWEBV.DLL /S
REGSVR32 JSCRIPT.DLL /S
REGSVR32 MSXML3.DLL /S

2.I have about 6 Restore points, unneeded, that were created when Technician was trying unsuccessfully to resolve the problem over the phone. They are taking too much space off my hard drive. i had 551 GB, now I am down to 548 GB.
3. I also have a issue with an Update Software or software manager by Copyright © 1997-2008 Acresso Software Inc. and/or InstallShield Co. Inc.. This is program for updating software, came pre-installed on my PC. I clicked on it and it asks me to insert CD of Roxio Burner . Apparently, the program detected new update for Roxio? I am not sure.
I hope you can help me!
thanks

A:is that safe to delete windows batch files? and other problems

Hi,
1. Yes, it is safe to delete them. Those files were run one time by technician and now they are unnecessary, but you may just move them to other localization. Maybe they'll be useful later.
2. If you don't need them and have other restore points, then you can delete them.

Read other 2 answers
RELEVANCY SCORE 74.4

Hi all,
I have a requirement where I want to delete the registry entry using .bat file. I have the Administrative Privilege and I am able to delete the registry manually by right clicking on the key and then selection "Delete". The key is deleted from
the registry without any error.

But when I tried to delete  the registry entry using .bat file (batch file) I am unable to delete the key. I am clueless why the .bat file is not deleting the registry entry whereas I can delete the registry manually but not using .bat file.
The content of .bat file is:-
%SystemRoot%\system32\reg.exe delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36fc9e60-c465-11cf-8056-444553540000} /v "LowerFilters" /f
%SystemRoot%\system32\reg.exe delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{36fc9e60-c465-11cf-8056-444553540000} /v "UpperFilters" /f

Please suggest me what I am doing wrong and how can I fix this issue.
Thanks for help.

Read other answers
RELEVANCY SCORE 74.4

I need to create a batch file to delete folders and the files that are in them. I have an application that is blowing up users profiles, not allowing them to log off until they reduce the profile size. Until I get a resolution from the application support team I need a batch file that I can send them that will delete two folders. Here is what I have to far and it is not working:

@echo off
deltree /y C:\Documents and Settings\SidesRJ\Documentum\ucf
deltree /y C:\Documents and Settings\SidesRJ\Documentum\cta
exit


Any help would be appreciated

A:Create a batch file to delete folders and files

deltree is a DOS/Windows 9x command.
In Windows NT 4 and higher (2000, XP, Vista, 7), you use rd /s (subdirectories)
If you want to do it without prompt you'd use the /q (quiet) flag
if you want to run it on different users' computers (with different usernames) use environment variables
to know what they are, open a command prompt window and type set
to access specific variables, use the % sign
for example in my computer, if you type %temp% in the address bar, it'll take you to that folder.

Read other 1 answers
RELEVANCY SCORE 74.4

hello, I was wondering just a few seconds why the subject Batch file to delete folder had been closed? the problem hasn't been solved?

So I was also wondering how to delete subfolders in batch command line or file?

A:[SOLVED] Batch file or command to delete folder

Oh! how stupid am I.

few minutes in google and the answer is :
for example you are dealing with the C:\temp folder and you want to erase all elements in it!
batch file :
@echo off

del "C:\temp\*" /Q /F /S
for /d %%X in ("C:\temp\*") do RMDIR /S /Q %%X

exit

command line for delete subfolders (if you want to test) :
for /d %X in ("C:\temp\*") do RMDIR /S /Q %X

I think it's larger better than erase the "C:\temp" folder and recreate it! Because if you want to do this for all the temporary folders (windows has it tricks)... it will be long. fortunately, you wouldn't do that because I made it for you, enjoy (just replace %profile% by you'r profile name or the profile name variable (%USERNAME%)):
@echo off
del "C:\Documents and Settings\%profile%\Local Settings\Temp\*" /Q /F /S
for /d %%X in ("C:\Documents and Settings\%profile%\Local Settings\Temp\*") do RMDIR /S /Q %%X

del "C:\Documents and Settings\%profile%\Local Settings\Temporary Internet Files\Content.IE5\*" /Q /F /S
for /d %%X in ("C:\Documents and Settings\%profile%\Local Settings\Temporary Internet Files\Content.IE5\*") do RMDIR /S /Q %%X

del "C:\Documents and Settings\%profile%\Local Settings\Application Data\Temp\*" /Q /F /S
for /d %%X in ("C:\Documents and Settings\%profile%\Local Settings\Application Data\Temp\*") do RMDIR /S /Q %%X

del "C:\temp\*" /Q /F /S
for /d %%X in ("C:\temp\*") do RM... Read more

Read other 2 answers
RELEVANCY SCORE 73.6

I have a root folder called "Names"..It has subfolders ,these subfolders contains files. I will be giving the names of subfolders to be deleted in text file Ex..
John
Tom
Rambo.
I will be reading the folder names from text file & delete only those folders with files inside the folder also .

Please provide me the code for it..I tired some POC's..But it didn't work.

A:Window Batch file to delete folders/subfolders that contain files

Hi,

Here's some sample batch script,

Code:
@echo off

if "%~1"=="" exit /b 1
pushd "%~dp0"

for /f "usebackq delims=" %%I in ("%~1") do (
if exist "%%~fI"\* rd /s /q "%%~fI" && echo Removed folder '%%~nxI'.
)

popd
Place the above batch file in with the folders that will be removed (i.e. place it inside the "Names" folder), then drop your text file list of folder names to be deleted onto the batch file.

You might want to test out this solution first.

Read other 5 answers
RELEVANCY SCORE 73.2

I got a batch file includes backup file and delete 7 days older bak files. The batch file works by click the batch file.  I put the batch file at the Windows task schedule. It run the backup part not deleting part.
My PC is W7 X64
forfiles /p "G:\DB-Frontend-Bak" /s /m *.* /d -7 /c "cmd /c del @path"
forfiles /p "G:\DB-Backend-Bak" /s /m *.* /d -7 /c "cmd /c del @path"
Why? Any help will be appreciated.

Thanks!

Read other answers
RELEVANCY SCORE 73.2

0 down vote favorite
I want to run a batch file that would delete files in a folder (and its sub folders) that are older then 30 days. I'm somewhat new to scripting so any help would be appreciated. The path to the folder is "C:\Documents and Settings\user profile\Application Data\Program\Program\folder\company name" That folder has many random sub folders - I need the batch file to delete any file in those subfolders older then 30 days.
Is this something that can be done with a batch file or would I need a higher level script - like vb scripting?
 

A:batch file to delete files in a folder and sub folders older than 30 days

Looks like Endoro has you covered on SO. He is very good at what he does. He is using FORFILES which is the perfect utility for this.
 

Read other 1 answers
RELEVANCY SCORE 72.4

Hi folks. I want to put a batch file together that will delete all files at the user profile in the following directories when my users log off:



C:\Users\USER\AppData\Local\Temp
C:\Users\USER\AppData\Local\Microsoft\Windows\Temporary Internet Files
C:\Windows\Temp



Help would be appreciated!  Thanks.

A:Help creating batch file that will delete all user profile temp files on logoff.

A simple del command line may not work, because you do not have access on the temp files of other users. If you still encounter problems after trying this suggestion, I recommend that you discuss it in our Script Center, you may need a VB script that can
ignore UAC.
The Official Scripting Guys Forum! 
Arthur Xie
TechNet Subscriber Support in forum  

If you have any feedback on our support, please contact
[email protected] 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 6 answers
RELEVANCY SCORE 70.4

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:

video1.mp4
video2.mp4
video3.mp4

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
RELEVANCY SCORE 67.2

I am wondering if anyone can provide the equivalent to this linux script. When run against a text file with one entry per line being the name of a directory, it deletes the named directories.

On linux, I run this against the text list.
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
rm -R $line
done < "$1"

I am not sure how to make it do the same for Windows. I can do this, but I'm hoping there's a way to delete based on what's in the text file. Also, wouldn't want it to prompt for deletion of each, but to just delete.

@echo on
cd \
cd %USERPROFILE%
dir /D /N 0
pause
for /D %%f in (XX*) do rmdir %%f /s
pause
%comspec% /k
pause


Thank you

Read other answers
RELEVANCY SCORE 66.8

Is there a way to create a batch file that will automatically delete the "Games" folder?

A:Batch File to delete "Games" folder

Which games folder are you referring to?
Could you give us a path.

Read other 2 answers
RELEVANCY SCORE 66.4

I am wondering how to write a script that would delete all files of a certain extension from a folder.
 

A:Solved: Batch file to delete all .xxx files from a file

Read other 6 answers
RELEVANCY SCORE 66.4

Alright, so what I'm trying to do is list all the shortcuts & folders in the start menu and list all the shortcuts & folders on the desktop and put this into a text file. The reason is to get a full list of programs our teachers use before we re-image their machine and not all of their programs are listed in add/remove programs and not all programs make a folder in Program Files, that is why I'm trying to do it in this roundabout way. What I have so far is this:

@echo off
mkdir "p:\Program List"
DIR "c:\documents and settings\all users\start menu\*" /S/B/OD > "p:\Program List\%computername% Start Menu.txt"
DIR "c:\documents and settings\all users\desktop\*" /S/B/OD > "p:\Program List\%computername% Desktop.txt"

This works perfectly but the only problem is the file has these:
c:\documents and settings\all users\start menu\
c:\documents and settings\all users\desktop\

before each entry in the text file. Is there an easy way to remove these lines so the text files are easier to read? I've checked other sources and can't figure out how to get this to work...

A:[SOLVED] Delete text from .txt file in a batch file

Open the files in Notepad, click Edit, then replace, and enter the string C:\Documents and Settings\All Users\ and replace it with nothing (no entry).

:)

Read other 10 answers
RELEVANCY SCORE 64.8

I am having a problem with a batch script that prompts a user to enter a set of responses which then set variables - Then the script will call in another batch and writes the output to a new Batch file.

The problem is the batch file doesn't output the new Batch file the way I intended.

This is the script I have:

BEGIN.BAT

:START
@ECHO OFF
CLS
ECHO.
ECHO Please enter the full filename reference (e.g. 1-210208)
ECHO.
SET REFERENCE=
SET /P REFERENCE=
CLS
ECHO.
ECHO Please enter the full description (e.g. 12:15 on Thursday 21 FEBRUARY 2008)
ECHO.
SET Description=
SET /P Description=
CLS
ECHO.
ECHO Please enter the date reference (e.g. 210208)
ECHO.
SET DTE=
SET /P DTE=
CLS
ECHO.
ECHO Please enter the reservation slot time (e.g. 1215)
ECHO.
SET TME=
SET /P TME=
CLS
ECHO.
ECHO Please enter the script file you are replacing (e.g. 001)
ECHO.
SET Replace=
SET /P Replace=
CLS
ECHO.
ECHO Please enter the continuing script file (e.g. 002)
ECHO.
SET NxtFile=
SET /P NxtFile=
CALL "\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\ADMIN\TEMPLATE.CMD">"\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\DATES\%Replace%.BAT"
CLS
ECHO.
ECHO REPLACEMENT OF %Reference% completed!
PAUSE
GOTO START

TEMPLATE.BAT

ECHO @ECHO OFF
ECHO CLS
ECHO IF EXIST "\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\%REFERENCE%.TXT" (
ECHO GOTO NEXT
ECHO ) ELSE (
ECHO GOTO EXIST
ECHO )
ECHO :EXIST
ECHO ECHO.
ECHO ECHO %DESCRIPTION% IS AVAILABLE
E... Read more

A:Help with Batch script that creates a Batch script

Try This

Template.Bat
Code:

@ECHO OFF
CLS
IF EXIST "\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\%REFERENCE%.TXT " (
GOTO NEXT
) ELSE (
GOTO EXIST
)
:EXIST
ECHO.
ECHO %DESCRIPTION% IS AVAILABLE
ECHO.
ECHO Would you like to reserve this time?
ECHO.
ECHO Yes (Y) or No (N) or Cancel (C)
ECHO.
:ERROR
SET CHOICE=
SET /p CHOICE=Enter response to continue (Case sensitive):
IF not '%choice%'=='' set choice=%choice:~0,1%
IF '%choice%'=='Y' goto YES
IF '%choice%'=='N' goto NEXT
IF '%choice%'=='C' goto CANCEL
ECHO "%choice%" is not valid please try again
ECHO.
GOTO ERROR
:YES
ECHO %DESCRIPTION%>>"\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\ %REFERENCE%.TXT"
ECHO RESERVED BY %FullName%>>"\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\%REFERENCE%.TXT"
ECHO LOCATED ON %Team%>>"\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\%REFERENCE%.TXT"
ECHO STAFF ID IS %USERNAME%>>"\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\%REFERENCE%.TXT"
ECHO "%DATE%","%TIME%","%USERNAME%","%FullName%","%Team%","%DTE%","%TME%">>"\\hb eu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\LOG\AUDIT.CSV"
ECHO.
ECHO Thank you %FullName% - Your reservation has been successful.
ECHO.
PAUSE
:NEXT
CALL "\\hbeu\DfsRoot\GB002\Retail\405447\SYSTEMS\SHARED\INET\ONE\DATES\002.BAT&quo... Read more

Read other 3 answers
RELEVANCY SCORE 60.4

No, I didn't stutter.

I'm wondering if there is a way to batch delete all the user-pinned items that show up when I right-click, say, the OOffice Writer user-pinned icon on the task bar, revealing all my user-pinned documents (as well all the recently opened non-pinned docs)?

I know I can delete them individually, one-by-one, but I'm wondering where they're listed, say, in the registry or in appdata, or something, that would allow me to delete them all at once.

Clear as mud? Here's a pic:

Read other answers
RELEVANCY SCORE 57.2
Q: Batch

I want to create a Batch file using PSexec, which when i run should give a pop up for the Computername and the setup file location Path. Please help.
c:\PSTools>PsExec.exe -i -s -d \\PCname -u username -p Password "\\filelocation"

so, I need to run this PSexec file, and it should pop up for PC name and file location.

Read other answers
RELEVANCY SCORE 57.2

I need some help with this quick batch app im making that uses HSTART.EXE & ROBOCOPY.EXE
Basicaly it checks the Recycle Bin and all removable storage drives for files & then copies all of them to C:\0\1
But i need to figure out how to prevent Robocopy.exe from running the same command thread twice at the same time
when the bacth reapeats over on itself again, if its already in the process of copying files over..
How can i do this..??

{> BATCH CODE APP <}

:UP
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe C:\RECYCLER C:\0\1\REC /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe E: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe F: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe G: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe H: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe I: C:\0\1 /XX /mir /r:0"
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\Robocopy.exe J: C:\0\1 /XX /mir /r:0"
PING 127.0.0.1 -n 5
cls
GOTO UP
 

A:Need Help With My Batch App...!!!

I think i fixed it to work right..
THIS SEEMS TO WORK


{>NEW BATCH CODE <}

:UP

tasklist | find /i "R-copy-1.exe" && goto SKIP-1
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-1.exe C:\RECYCLER C:\0\1\REC /XX /mir /r:0"
:SKIP-1

tasklist | find /i "R-copy-2.exe" && goto SKIP-2
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-2.exe E: C:\0\1 /XX /mir /r:0"
:SKIP-2

tasklist | find /i "R-copy-3.exe" && goto SKIP-3
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-3.exe F: C:\0\1 /XX /mir /r:0"
:SKIP-3

tasklist | find /i "R-copy-4.exe" && goto SKIP-4
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-4.exe G: C:\0\1 /XX /mir /r:0"
:SKIP-4

tasklist | find /i "R-copy-5.exe" && goto SKIP-5
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-5.exe H: C:\0\1 /XX /mir /r:0"
:SKIP-5

tasklist | find /i "R-copy-6.exe" && goto SKIP-6
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-6.exe I: C:\0\1 /XX /mir /r:0"
:SKIP-6

tasklist | find /i "R-copy-7.exe" && goto SKIP-7
start %MYFILES%\hstart.exe /nowindow "%MYFILES%\R-copy-7.exe J: C:\0\1 /XX /mir /r:0"
:SKIP-7

PING 1 -n 5
cls
GOTO UP



I just need now to find a way for Robocopy.exe to not overwrite files in the destination DIR , if in the source DIR it copies ... Read more

Read other 1 answers
RELEVANCY SCORE 57.2
Q: Batch

I need to make a batch that cuts all processes belonging to the user... But I don't know the individual processes name to use taskkill.

I have :

@ echo off
qprocess * |more
echo.
echo.
echo to cut all processes belonging to %username%:
pause

HELP!
 

RELEVANCY SCORE 57.2

I have a 3.4ghz 550 p4 it idles hot, and if i go through newegg and look at all the reviews on it, for a while alot of people had high temps.
 

A:Is it possible to have a bad batch of P4's

the 5xx series is know to have extreme heating issues. My buddy has a gateway with a 550, it idels at the same temp. Im not sure about a bad batch (altough i guess it could happn) rather the whole prescott core is hot. Getting a better heatsink would help alot, but as long as you do not expirence actual problems while using thew PC i wouldnt loose sleep over it.

Sean
 

Read other 3 answers
RELEVANCY SCORE 57.2

Hello, i dont know if what i want is posible or not but heres what i want to do and need help with doing.

I want to copy files and directories from a CD-rom to the C: drive.
This is not witch is hard, here comes the twist in my ear, The batch file will be ON the cd and so can not be edited, the CD has to be usable on anny computer.

Normaly if one makes a batch you do copy d:\files\*.* C:\files
D in this case being the CD-rom, but since not everyone has the D as cd-rom, i cant do it this way.

Recap: How to copy files in a dir on a cd to the C drive without being able to specifie the exact source path.
 

A:Need help with Batch

Read other 8 answers
RELEVANCY SCORE 57.2

Hi All,
My command line is c:\sed\sed abcd.jcl
I want to written a batch file which runs above command for all .jcl files
in a specific directory.
I want source code for that ,Also number of .jcl files are not fixed
 

A:Batch help

Read other 9 answers