![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find and replace command in one line using one command | vasikaran | UNIX for Dummies Questions & Answers | 10 | 08-20-2008 10:40 AM |
| assign a command line argument and a unix command to awk variables | sweta_doshi | Shell Programming and Scripting | 0 | 08-08-2008 06:54 AM |
| how to? launch command with string of command line options | TinCanFury | Shell Programming and Scripting | 5 | 04-28-2008 06:06 PM |
| how to tell which OS via command line | hankooknara | UNIX for Dummies Questions & Answers | 4 | 05-15-2007 11:39 PM |
| Command line... | laila63 | Shell Programming and Scripting | 15 | 07-14-2004 03:37 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Command line help please
Hello, I'm making a batch command to delete all the files in my "recent files" folder. At first I set it up so that it would create a .txt file in there, then delete all the files in there, so that I wouldn't get an error message when I ran it. Here is what I had...
@echo off echo.>"C:\Documents and Settings\James\Recent\"file.txt del /q "C:\Documents and Settings\James\Recent\*.*" ECHO Arg, I'm getting Tired Of Making These! ECHO. PAUSE What I'd like to do is have a command that will only tell it to delete the files there is one exist. So I tried the following command line in a different batch command. @echo off if exist "C:\Documents and Settings\James\Recent\*.*" del /q "C:\Documents and Settings\James\Recent\*.*" echo hi everyone echo. PAUSE I get most of my command lines from friends and random internet people, so I can't really figure out what to change myself. I tried a few variations but I haven't been getting anywhere... |
|
|||||
|
I am guessing that the files are marked read-only if you are getting a prompt to make sure you want to delete. Some of the delete options are:
/P to confirm (prompt) delete /F to force delete read-only files /Q quiet mode, do not confirm with wildcards Take a look at the following website that has a fairly extensive description for most DOS commands -- MS-DOS help and commands |
|
||||
|
Hi everyone!
Special thanks to:joeyg I changed the command from... @echo off if exist "C:\Documents and Settings\James\Recent\*.*" del /q "C:\Documents and Settings\James\Recent\*.*" echo hi everyone echo. PAUSE to... @echo off if exist "C:\Documents and Settings\James\Recent\*.*" del "C:\Documents and Settings\James\Recent\*.*" /Q echo hi everyone echo. PAUSE And it workes perfectly! thank-you |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|