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




Similar help and support threads
Thread Forum
Custom User Restrictions(ideally Admin rights -new account creation)
Just wondering is it is possible to leave admin status on a user account while removing the ability to make new accounts. Alternatively could one make a standard account have admin style(ie. altering files, running files as an admin/in admin mode, etc.) rights except the creation of new accounts?...
General Discussion
Custom thumbnails for video files (mkv)
Hi all, I have some mkv files and I want to have custom thumbnails for them, like some jpg images in the same folder as the videos so Windows will display them as thumbnails in explorer instead of the default WMP icons. Is this possible? Thanks all,
Music, Pictures & Video
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
86 program files in new 64 bit custom install.
I have just upgraded my HP Pavilion to a 64 bit system. when I open 'Program Files', together with 'Old Files' there is also '86 Program Files'. when I download a new application the default location choice is the 86 Program File. I know that this is causing conflicts as I have 2 Explores running...
General Discussion
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 12:23.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App