Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › Help with a DEL .bat file.
New Posts  All Forums:Forum Nav:

Help with a DEL .bat file.

post #1 of 8
Thread Starter 
I want to create a file that when I click on it, it will delete a specif file on a different folder.

So what I did is: I created a .bat file with: "del C:\Program Files (x86)\World of Warcraft\Cache\WDB\enUS\creaturecache.wdb"

but my problem is that when I click on it nothing happens because it cant find the file, the reason why is because the DOS command has a c:\Users\name\ on default, so every time I click it I looks like this "c:\Users\name\del C:\Program Files (x86)\World of Warcraft\Cache\WDB\enUS\creaturecache.wdb"

I dont know nothing about commands and I started google to come with this way to this idea but I need help now.

Thanks
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600k Asus P8P67 Pro 6970 8GB Corsair 
Hard DriveOSKeyboardPower
1TB WD Caviar Black Windows Seven G19, G13 Corsair AX850 
CaseMouseMouse Pad
Lian Li x2000f Razer Mamba / Naga QPAD Black 
  hide details  
Reply
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600k Asus P8P67 Pro 6970 8GB Corsair 
Hard DriveOSKeyboardPower
1TB WD Caviar Black Windows Seven G19, G13 Corsair AX850 
CaseMouseMouse Pad
Lian Li x2000f Razer Mamba / Naga QPAD Black 
  hide details  
Reply
post #2 of 8
It needs to be this:
Code:
del "C:\Program Files (x86)\World of Warcraft\Cache\WDB\enUS\creaturecache.wdb"
post #3 of 8
Thread Starter 
But that is what I did and it's not working I took a screen shot and was able to capture this

PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600k Asus P8P67 Pro 6970 8GB Corsair 
Hard DriveOSKeyboardPower
1TB WD Caviar Black Windows Seven G19, G13 Corsair AX850 
CaseMouseMouse Pad
Lian Li x2000f Razer Mamba / Naga QPAD Black 
  hide details  
Reply
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600k Asus P8P67 Pro 6970 8GB Corsair 
Hard DriveOSKeyboardPower
1TB WD Caviar Black Windows Seven G19, G13 Corsair AX850 
CaseMouseMouse Pad
Lian Li x2000f Razer Mamba / Naga QPAD Black 
  hide details  
Reply
post #4 of 8
Is that command prompt running as an administrator? Executables cannot modify the contents of Program Files if UAC is enabled, and authority is not granted to the process.
post #5 of 8

Seems to me like a formatting issue with the spaces.

Main Rig
(12 items)
 
  
CPUMotherboardGraphicsRAM
R7 1800x ASUS Prime 370 Pro RX 480 Corsair Dominator 
Hard DriveOptical DriveOSMonitor
Samsung 850 Pro  None Windows 10 Pro HP w19e: 1440x900 | Sony KDL40S-5100 1920x1080 
KeyboardPowerCaseMouse
CMStorm Quick Fire. CM 1050w  Cooler Master Cosmos II Roccat Kone XTD (Optical) 
  hide details  
Reply
Main Rig
(12 items)
 
  
CPUMotherboardGraphicsRAM
R7 1800x ASUS Prime 370 Pro RX 480 Corsair Dominator 
Hard DriveOptical DriveOSMonitor
Samsung 850 Pro  None Windows 10 Pro HP w19e: 1440x900 | Sony KDL40S-5100 1920x1080 
KeyboardPowerCaseMouse
CMStorm Quick Fire. CM 1050w  Cooler Master Cosmos II Roccat Kone XTD (Optical) 
  hide details  
Reply
post #6 of 8
It appears to be word wrapping, like the DOS shell is wont to do.
post #7 of 8

Try using

 

 


Del C:\"Program Files (x86)\World of Warcraft\Cache\WDB\enUS\creaturecache.wdb
Main Rig
(12 items)
 
  
CPUMotherboardGraphicsRAM
R7 1800x ASUS Prime 370 Pro RX 480 Corsair Dominator 
Hard DriveOptical DriveOSMonitor
Samsung 850 Pro  None Windows 10 Pro HP w19e: 1440x900 | Sony KDL40S-5100 1920x1080 
KeyboardPowerCaseMouse
CMStorm Quick Fire. CM 1050w  Cooler Master Cosmos II Roccat Kone XTD (Optical) 
  hide details  
Reply
Main Rig
(12 items)
 
  
CPUMotherboardGraphicsRAM
R7 1800x ASUS Prime 370 Pro RX 480 Corsair Dominator 
Hard DriveOptical DriveOSMonitor
Samsung 850 Pro  None Windows 10 Pro HP w19e: 1440x900 | Sony KDL40S-5100 1920x1080 
KeyboardPowerCaseMouse
CMStorm Quick Fire. CM 1050w  Cooler Master Cosmos II Roccat Kone XTD (Optical) 
  hide details  
Reply
post #8 of 8
Thread Starter 
Hey guys thanks a lot, when Tracks first posted what it needed to be like, I checked the spelling and it seen to be like mine, but I missed the " (quote i guess), now disturbed posted to me try the same thing so I was like I must be doing something wrong both people telling me to try something that looks like mine, so I copy and paste and it worked. Now taking a closer look at it, I saw that mine didnt had the ".

del C:\Program Files (x86)\World of Warcraft\Cache\WDB\enUS\creaturecache.wdb

vs

Del C:\"Program Files (x86)\World of Warcraft\Cache\WDB\enUS\creaturecache.wdb

or

del "C:\Program Files (x86)\World of Warcraft\Cache\WDB\enUS\creaturecache.wdb"

so this is the reason right? xD

Thank you both and sorry I missed it a first... but thank's

Rep+
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600k Asus P8P67 Pro 6970 8GB Corsair 
Hard DriveOSKeyboardPower
1TB WD Caviar Black Windows Seven G19, G13 Corsair AX850 
CaseMouseMouse Pad
Lian Li x2000f Razer Mamba / Naga QPAD Black 
  hide details  
Reply
PC
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 2600k Asus P8P67 Pro 6970 8GB Corsair 
Hard DriveOSKeyboardPower
1TB WD Caviar Black Windows Seven G19, G13 Corsair AX850 
CaseMouseMouse Pad
Lian Li x2000f Razer Mamba / Naga QPAD Black 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Windows
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › Help with a DEL .bat file.