Delete file with command in .bat file
pachanga
Posted messages
928
Status
Member
-
Pierrot6150 Posted messages 3186 Status Member -
Pierrot6150 Posted messages 3186 Status Member -
Hello,
I'm trying to test file deletion with a ".bat" file and it never works. I've followed instructions from two computer sites with various command options and it never works.
examples tried
del c:\test
or
del c:\test\*.*
or
"Here's how to create a Windows Batch File that deletes the contents of GIMP's thumbnail folder:
1. On your desktop, right-click and create a new Text Document.
2. Notepad will launch. Now insert the following line into notepad:
del C:\Users\Owner\.thumbnails\normal\*.* /Q
"
I know I need to replace some terms like the username or folder
if someone can guide me through this, it would be appreciated.
Thanks! :)
Configuration: ASUS P5QPL VM- INTEL E5400 2.7GHZ- DDR2RAM4GO- WINDOWS XP SP3 -GT220GEFORCE, Windows XP / Internet Explorer 8.0
I'm trying to test file deletion with a ".bat" file and it never works. I've followed instructions from two computer sites with various command options and it never works.
examples tried
del c:\test
or
del c:\test\*.*
or
"Here's how to create a Windows Batch File that deletes the contents of GIMP's thumbnail folder:
1. On your desktop, right-click and create a new Text Document.
2. Notepad will launch. Now insert the following line into notepad:
del C:\Users\Owner\.thumbnails\normal\*.* /Q
"
I know I need to replace some terms like the username or folder
if someone can guide me through this, it would be appreciated.
Thanks! :)
Configuration: ASUS P5QPL VM- INTEL E5400 2.7GHZ- DDR2RAM4GO- WINDOWS XP SP3 -GT220GEFORCE, Windows XP / Internet Explorer 8.0
1 answer
-
Hello,
Which files do you want to delete?
When you run the command, for example del c:\test\*.*, what error messages do you get? Do you have a C:\test directory that contains files to execute such a deletion command?
Best regards
--
A stranger is a friend we haven't met yet.-
-
-
-
-
Uppercase or lowercase, Windows does not make a distinction.
For your information:
This example does not work, that's normal.
del C/test/*.*
or
del C/test/
The /
is reserved to indicate to Windows that a parameter is being input in the command line.
More info under the command prompt DEL /?
* 1 space between DEL and /
PS:
You also need to specify the drive with a colon (missing from you) C:
-