Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Custom .bat .cmd files creation help.

14 Sep 2011   #11
asdf123

Windows 7 Pro 64-bit
 
 

Thanks guys. I will look into this. One more thing: is there a batch file command to delete all files named i.e "XYZ.EXT" on whole drive "C:\" and subfolders? For example if I wanted to delete all *.tmp files on C:\ without pointing to each folder and subfolder.


My System SpecsSystem Spec
.
14 Sep 2011   #12
rraod

MS Windows 7 Ultimate 64-bit SP1
 
 

This is the help for del command on Command window or in a batch file.

C:\>del /?
Deletes one or more files.
DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
names Specifies a list of one or more files or directories.
Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.
/P Prompts for confirmation before deleting each file.
/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
- Prefix meaning not
If Command Extensions are enabled DEL and ERASE change as follows:
The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.

You can use the command
Del C:\*.tmp /S /Q

to delete all the temp files with extension tmp on C: drive and all the subdirectories (/S) and without asking you for confirmation (/Q).

To change the drive replace C: with the correct drive letter.
My System SpecsSystem Spec
14 Sep 2011   #13
asdf123

Windows 7 Pro 64-bit
 
 

Okay,
How do I delete the "desktop.ini" files. I've tried the line
"del /s /q /F "C:\desktop.ini" and it doesn't work. It deletes only some of the desktop.ini files not all of them (not talking about the Windows protected desktop.ini files).
My System SpecsSystem Spec
.

14 Sep 2011   #14
rraod

MS Windows 7 Ultimate 64-bit SP1
 
 

Desktop.ini files are used for customizing things like the folder's icon and localized name. Usually they have a system and hidden attributes set so that they are not visible.These files are small files and does not take up much space and best left alone.

I used to clean the desktop.ini and thumbs.db in Windows XP very religiously. But got fed-up as these files are getting created by windows again on next reboot. Hence just set the protected operating system files to be hidden and show hidden files and folders....(out of sight - out of mind). In Windows 7 I stopped bothering about these files.

If you still wants to delete these files try the below commands.
attrib -h -s C:\desktop.ini /S
del C:\desktop.ini /S /Q
My System SpecsSystem Spec
14 Sep 2011   #15
SundRance

Windows 7 Pro 32bit / Windows 7 Ultimate x64
 
 

If ANY of the sytem files bother me, it's those damn thumbs.db files. Trying to delete a folder that contains (or even contained) any type a graphic - especially across systems - one computer to another - is a PITA.

STILL: Windows 7 is a good OS and the thumbs data bases help speed up browsing folders. INI files are important too, and store display information. I find it best to NOT display hidden files, and also keep hidden protected files and Windows seems to function pretty well. Only when I am really re-arranging things do the thumbs files give me grief.

Best Wishes, and be careful with that DEL command,
Rªnce
My System SpecsSystem Spec
Reply

 Custom .bat .cmd files creation help.




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Custom Genres for Music Files
I am in the process of revamping my music files into a better database. For right now, I'm just doing it through the windows folders. Since the files are MP3, the folders know they are music and it gives the options of Song Title, Artist, Genre, etc. When entering a genre, there are some...
Customization
Unintended Creation of Files
Hey guys, I frequently like to pull Notepad up, jot down my thoughts kind of like a journal thing, and then store them in a special folder. There's no special organization yet, they literally are just kind of my random thoughts that I'd like to come back to without forgetting about them, and if...
General Discussion
custom .reg files, or windows install
Hey sevenforums, first time poster Just wondering if you are able to make a custom registry file (or something of the like) in order to apply certain settings to a new windows 7 x64 installation? i wipe my drive often, and i use Ninite for a few applications, but theres also some settings i...
Customization
If I do a custom upgrade, how do I get my files back?
Hi there! :) I'm going to be a university student at Indiana University in the fall, so during orientation I picked up a student version of Windows 7 Ultimate for my HP Compaq laptop, which I bought back when Vista was brand new --I cant afford a new laptop right now, and the hardware is still...
Installation & Setup


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 03:58.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App