PC Review


Reply
Thread Tools Rate Thread

Continue -- Delete files older than Xdays

 
 
Babu
Guest
Posts: n/a
 
      30th Jun 2004
Iam executing the below command.. It errors out saying
invalid directory.. because it cannot understand the
directory name more than 8 characters. Let me know is
there any fix for the same
--------------------------------------------
forfiles -pC:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\ -s -m*.Bak -d-4 -c"CMD /C
DEL /Q ""@PATH\@FILE""

--------------------------------------------

Appreciate ur help

Babu


 
Reply With Quote
 
 
 
 
Paul R. Sadowski
Guest
Posts: n/a
 
      30th Jun 2004
You didn't quote the path:
forfiles -p"C:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\" -s -m*.Bak -d-4 -c"CMD /C DEL /Q ""@PATH\@FILE""

"Babu" <(E-Mail Removed)> wrote in message
news:23d5301c45ec0$ce687320$(E-Mail Removed)...
> Iam executing the below command.. It errors out saying
> invalid directory.. because it cannot understand the
> directory name more than 8 characters. Let me know is
> there any fix for the same
> --------------------------------------------
> forfiles -pC:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\ -s -m*.Bak -d-4 -c"CMD /C
> DEL /Q ""@PATH\@FILE""
>
> --------------------------------------------
>
> Appreciate ur help
>
> Babu
>
>



 
Reply With Quote
 
Phil Robyn [MVP]
Guest
Posts: n/a
 
      30th Jun 2004
Babu wrote:

> Iam executing the below command.. It errors out saying
> invalid directory.. because it cannot understand the
> directory name more than 8 characters. Let me know is
> there any fix for the same
> --------------------------------------------
> forfiles -pC:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\ -s -m*.Bak -d-4 -c"CMD /C
> DEL /Q ""@PATH\@FILE""
>
> --------------------------------------------
>
> Appreciate ur help
>
> Babu
>
>


Type 'FORFILES -?' at the CMD prompt for some examples. Your
problems have to do with your use of too many or too few double
quotes. For example, you will have to use

. . . -c"CMD /C DEL /Q 0x22@PATH\@FILE0x22"

instead of what you are using. Also, the path after '-p' must
be enclosed in double quotes since there are spaces in the path.

--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l
 
Reply With Quote
 
Babu
Guest
Posts: n/a
 
      1st Jul 2004
Thanks a lot for your inputs it works

Babu
>-----Original Message-----
>You didn't quote the path:
>forfiles -p"C:\Program Files\Microsoft SQL
>Server\MSSQL\BACKUP\" -s -m*.Bak -d-4 -c"CMD /C

DEL /Q ""@PATH\@FILE""
>
>"Babu" <(E-Mail Removed)> wrote in message
>news:23d5301c45ec0$ce687320$(E-Mail Removed)...
>> Iam executing the below command.. It errors out saying
>> invalid directory.. because it cannot understand the
>> directory name more than 8 characters. Let me know is
>> there any fix for the same
>> --------------------------------------------
>> forfiles -pC:\Program Files\Microsoft SQL
>> Server\MSSQL\BACKUP\ -s -m*.Bak -d-4 -c"CMD /C
>> DEL /Q ""@PATH\@FILE""
>>
>> --------------------------------------------
>>
>> Appreciate ur help
>>
>> Babu
>>
>>

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete files older than X days babu Microsoft Windows 2000 CMD Promt 8 22nd Apr 2011 04:21 AM
delete all files, which older than 5 days Thomas Bauer Microsoft C# .NET 2 8th Jan 2008 08:05 PM
Delete files older than X days old. Kenneth Keeley Microsoft Windows 2000 File System 3 1st Sep 2004 12:58 AM
delete files older than X date Scott Closter Microsoft Windows 2000 CMD Promt 4 27th Apr 2004 02:51 PM
Re: Delete files older than a week Dave Patrick Microsoft Windows 2000 Deployment 5 2nd Jul 2003 03:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:33 PM.