REM deletes a file
C: del filename
exit
Create a file, above, using wordpad and save it with the extension .BAT
Modify the line C: del filename, to indicate where the file is and instead of 'filename' write the name of the file you want to delete.
(REM is just a remark to remind you what it does..)
Say you call the batch file 'deleter.bat', then you have to include this file name in the startup program file.
This will depend on what operating system you are using.
Old DOS, would use an autoexec.bat file.
You could then actually add the delete command in with the autoexec.bat file.
If it says access is denied that means that access is deined, you can't delete it. I think you are probably trying to make a batch file virus to delete system files and is trying to make the batch file delete everything, but came into the access is deined problem.
Delete it...
in your batch file type: Move (the directory or folder and the file) space (the directory you want it in) example: move "C:\Users\%username%\Desktop\text.txt" "C:\Users\%username% You can change the %username% to your username but %username%is the variable for your username
rm filenameorrm -r directoryname
cp - copy a file rm - delete a file mv - rename a file mkdir - create a directory rmdir - remove a directory etc...
Some files can be protected from being deleted either because they are important system files or belong to a person who protected it, so if you don't own the rights for the file/folder you wish to delete, the batch file will not delete and will just say "Access is Denied".
You can make a folder with batch by using the command: md Foldername Example: @echo off md WikiAnswers exit The batch file would make a folder named WikiAnswers, and it would appear on your desktop
The command for deleting a file in DOS is DEL. If the file you are trying to delete is in the current directory, type DEL followed by the full filename. E.g. del file001.txt If there are multiple files, the wildcard * can be used. del file*.txt will delete all the text files that start with 'file' del file*.* will delete all the files that start with file. del *.txt will delete all the text files. del *.* will delete all the files in the current directory. It is possible to delete files in another directory by typing the full path and filename del c:\folder01\*.* will delete all the files in the directory c:\folder01\ DEL will not affect hidden files, but careless use of this command could damage your operating system so use with care.
Ah, darling, it's as easy as pie. Just whip up a batch file with the command "copy %~dp0*.* destination_folder" and voilà, you're all set to copy those files from the same folder. No need to break a sweat, it's a piece of cake!
i deleted this from my windows millennium edition computer by booting up in dos with the starup disk changing to the windows directory and typing del nem218.dll i had 3 other files i needed to delete the same way everything seems to work good now
what is booting file win vista
The command is as follows : del c:\[directory you want to delete] /s This would need to be in a text file created in notepad, and saved as a .bat file. Or you could type EDIT from the command line to bring up the old DOS editor. Improving answer: Step 1: Open up Notepad Step 2: Type the following code in: @echo off deltree [Your hard drive, usually C:]\[Directory you want to delete /s for quietly Step 3: Save as "whateveryouwantwithoutquotes.bat"