Re: batch deleting backup files
Gilding the lily further: you could add another parameter %2% to the dir and del commands to put in the "/S" ... as long as you also remembered to use the %1% for the top of the directory that you want the backups to be deleted in - and did not use it accidentally with a file name or directory name: @echo off echo. echo Deleting the following files from the directory: cd %1% dir *.backup.* *.lck %2% echo. del *.backup.* *.lck %2% Z Syed Zaeem Hosain wrote: > Perhaps adding a > master path and /s to catch the subdirectories would do the trick Yes, works if the master path is consistent and does not cause problems for any non-FM files below it - not likely, but you never know! Yet another possibility ... since the folders may be different for different projects (but now, we are starting to gild the lily): Add a parameter to the .BAT file and call it with the directory you want - with no parameter, it just works in the current directory. Still best to do it from a DOS window or a Run command line (which works in this case, since you can specify the directory). BTW, I continue to be leery of the /S - too uncontrolled an action! @echo off echo. echo Deleting the following files from the directory: cd %1% dir *.backup.* *.lck echo. del *.backup.* *.lck Regards, Z Rene Stephenson wrote: It's been a while since I messed with .BAT, but... Perhaps adding a master path and /s to catch the subdirectories would do the trick: @echo off echo. echo Deleting the following files from the current directory: cd [MainPathForFMfiles] dir *.backup.* *.lck /s echo. del *.backup.* *.lck /s HTH Rene Stephenson */Syed Zaeem Hosain <[EMAIL PROTECTED]>/* wrote: Hi, Mike. Mike Wickham wrote: >> Put the following into a file (named with extension .BAT): >> >> @echo off >> echo. >> echo Deleting the following files from the current directory: >> dir *.backup.* *.lck >> echo. >> del *.backup.* *.lck >> >> and that will do the trick when you execute the batch program in a >> DOS window or from the Run command line. > > Even easier, put a shortcut to the batch file on your desktop or > elsewhere, and click on it to run it. Uh ... I think that is not gonna work too well, if you are in the wrong directory (your desktop?) when you run it. In fact, I think my previous advice to use the Run command line has the same problem! Oops. So, best to have it in a folder that is in your path and then execute it from a DOS window in the correct directory. As, also mentioned by others for the DEL command, if you want all backup files in a directory tree removed, you can add the /S switch. What was not mentioned is that you can add that switch to the DIR command too! BTW, I would be very careful of the /S switch ... if you are in the wrong folder. When I tried it from my C:\ root, it found some files that I would not want deleted (without knowing what they were)! Z -- - Syed Zaeem HosainSVP, Engineering & Chief Technical Officer Aeris Communications, Inc. tel: (408) 557-1905 2680 Zanker Roadfax: (408) 557-1925 San Jose, CA 95134-2100. [EMAIL PROTECTED] - ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
batch deleting backup files
Gilding the lily further: you could add another parameter %2% to the dir and del commands to put in the "/S" ... as long as you also remembered to use the %1% for the top of the directory that you want the backups to be deleted in - and did not use it accidentally with a file name or directory name: @echo off echo. echo Deleting the following files from the directory: cd %1% dir *.backup.* *.lck %2% echo. del *.backup.* *.lck %2% Z Syed Zaeem Hosain wrote: > > Perhaps adding a > > master path and /s to catch the subdirectories would do the trick > > Yes, works if the master path is consistent and does not cause > problems for any non-FM files below it - not likely, but you never > know! > > Yet another possibility ... since the folders may be different for > different projects (but now, we are starting to gild the lily): > > Add a parameter to the .BAT file and call it with the directory you > want - with no parameter, it just works in the current directory. > Still best to do it from a DOS window or a Run command line (which > works in this case, since you can specify the directory). BTW, I > continue to be leery of the /S - too uncontrolled an action! > > @echo off > echo. > echo Deleting the following files from the directory: > cd %1% > dir *.backup.* *.lck > echo. > del *.backup.* *.lck > > Regards, > > Z > > Rene Stephenson wrote: >> It's been a while since I messed with .BAT, but... Perhaps adding a >> master path and /s to catch the subdirectories would do the trick: >> @echo off >> echo. >> echo Deleting the following files from the current directory: >> cd [MainPathForFMfiles] >> dir *.backup.* *.lck /s >> echo. >> del *.backup.* *.lck /s >> HTH >> Rene Stephenson >> >> */Syed Zaeem Hosain /* wrote: >> >> Hi, Mike. >> >> Mike Wickham wrote: >> >> Put the following into a file (named with extension .BAT): >> >> >> >> @echo off >> >> echo. >> >> echo Deleting the following files from the current directory: >> >> dir *.backup.* *.lck >> >> echo. >> >> del *.backup.* *.lck >> >> >> >> and that will do the trick when you execute the batch program >> in a >> >> DOS window or from the Run command line. >> > >> > Even easier, put a shortcut to the batch file on your desktop or >> > elsewhere, and click on it to run it. >> >> Uh ... I think that is not gonna work too well, if you are in the >> wrong >> directory (your desktop?) when you run it. In fact, I think my >> previous >> advice to use the Run command line has the same problem! Oops. >> >> So, best to have it in a folder that is in your path and then >> execute it >> from a DOS window in the correct directory. >> >> As, also mentioned by others for the DEL command, if you want all >> backup >> files in a directory tree removed, you can add the /S switch. What >> was >> not mentioned is that you can add that switch to the DIR command too! >> >> BTW, I would be very careful of the /S switch ... if you are in the >> wrong >> folder. When I tried it from my C:\ root, it found some files that I >> would >> not want deleted (without knowing what they were)! >> >> Z > -- - Syed Zaeem HosainSVP, Engineering & Chief Technical Officer Aeris Communications, Inc. tel: (408) 557-1905 2680 Zanker Roadfax: (408) 557-1925 San Jose, CA 95134-2100. Syed.Hosain at aeris.net -
Re: batch deleting backup files
> Perhaps adding a > master path and /s to catch the subdirectories would do the trick Yes, works if the master path is consistent and does not cause problems for any non-FM files below it - not likely, but you never know! Yet another possibility ... since the folders may be different for different projects (but now, we are starting to gild the lily): Add a parameter to the .BAT file and call it with the directory you want - with no parameter, it just works in the current directory. Still best to do it from a DOS window or a Run command line (which works in this case, since you can specify the directory). BTW, I continue to be leery of the /S - too uncontrolled an action! @echo off echo. echo Deleting the following files from the directory: cd %1% dir *.backup.* *.lck echo. del *.backup.* *.lck Regards, Z Rene Stephenson wrote: It's been a while since I messed with .BAT, but... Perhaps adding a master path and /s to catch the subdirectories would do the trick: @echo off echo. echo Deleting the following files from the current directory: cd [MainPathForFMfiles] dir *.backup.* *.lck /s echo. del *.backup.* *.lck /s HTH Rene Stephenson */Syed Zaeem Hosain <[EMAIL PROTECTED]>/* wrote: Hi, Mike. Mike Wickham wrote: >> Put the following into a file (named with extension .BAT): >> >> @echo off >> echo. >> echo Deleting the following files from the current directory: >> dir *.backup.* *.lck >> echo. >> del *.backup.* *.lck >> >> and that will do the trick when you execute the batch program in a >> DOS window or from the Run command line. > > Even easier, put a shortcut to the batch file on your desktop or > elsewhere, and click on it to run it. Uh ... I think that is not gonna work too well, if you are in the wrong directory (your desktop?) when you run it. In fact, I think my previous advice to use the Run command line has the same problem! Oops. So, best to have it in a folder that is in your path and then execute it from a DOS window in the correct directory. As, also mentioned by others for the DEL command, if you want all backup files in a directory tree removed, you can add the /S switch. What was not mentioned is that you can add that switch to the DIR command too! BTW, I would be very careful of the /S switch ... if you are in the wrong folder. When I tried it from my C:\ root, it found some files that I would not want deleted (without knowing what they were)! Z ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
batch deleting backup files
> Perhaps adding a > master path and /s to catch the subdirectories would do the trick Yes, works if the master path is consistent and does not cause problems for any non-FM files below it - not likely, but you never know! Yet another possibility ... since the folders may be different for different projects (but now, we are starting to gild the lily): Add a parameter to the .BAT file and call it with the directory you want - with no parameter, it just works in the current directory. Still best to do it from a DOS window or a Run command line (which works in this case, since you can specify the directory). BTW, I continue to be leery of the /S - too uncontrolled an action! @echo off echo. echo Deleting the following files from the directory: cd %1% dir *.backup.* *.lck echo. del *.backup.* *.lck Regards, Z Rene Stephenson wrote: > It's been a while since I messed with .BAT, but... Perhaps adding a > master path and /s to catch the subdirectories would do the trick: > @echo off > echo. > echo Deleting the following files from the current directory: > cd [MainPathForFMfiles] > dir *.backup.* *.lck /s > echo. > del *.backup.* *.lck /s > HTH > Rene Stephenson > > */Syed Zaeem Hosain /* wrote: > > Hi, Mike. > > Mike Wickham wrote: > >> Put the following into a file (named with extension .BAT): > >> > >> @echo off > >> echo. > >> echo Deleting the following files from the current directory: > >> dir *.backup.* *.lck > >> echo. > >> del *.backup.* *.lck > >> > >> and that will do the trick when you execute the batch program in a > >> DOS window or from the Run command line. > > > > Even easier, put a shortcut to the batch file on your desktop or > > elsewhere, and click on it to run it. > > Uh ... I think that is not gonna work too well, if you are in the wrong > directory (your desktop?) when you run it. In fact, I think my previous > advice to use the Run command line has the same problem! Oops. > > So, best to have it in a folder that is in your path and then execute it > from a DOS window in the correct directory. > > As, also mentioned by others for the DEL command, if you want all backup > files in a directory tree removed, you can add the /S switch. What was > not mentioned is that you can add that switch to the DIR command too! > > BTW, I would be very careful of the /S switch ... if you are in the > wrong > folder. When I tried it from my C:\ root, it found some files that I > would > not want deleted (without knowing what they were)! > > Z
batch deleting backup files
Hi Folks Someone posted the text for a batch file (or similar) recently for cleaning up backup files from a folder. I thought I had archived that information, but now I need it, I can't find it. I'd appreciate it if someone could send me the the information. Thanks Dave -- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Dave Reynolds Phone: (64) (3) 358 1029 Senior Technical Author Fax: (64) (3) 359 4632 Tait Electronics Ltd Email: dave.reynolds at tait.co.nz PO Box 1645 Christchurch New Zealand === This email, including any attachments, is only for the intended addressee. It is subject to copyright, is confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission. If the receiver is not the intended addressee, please accept our apologies, notify us by return, delete all copies and perform no other act on the email. Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission. ===
Re: batch deleting backup files
In the shortcut, you might want to specify the "Start In" directory. You can do this by finding your batch file, right-clicking and selecting "Create Shortcut," then right-clicking on the Shortcut and filling in the "Start In" field with the desired target directory. --- Mike Wickham <[EMAIL PROTECTED]> wrote: > >> Even easier, put a shortcut to the batch file on your desktop or > >> elsewhere, and click on it to run it. http://technical-writing.dionysius.com/ technical writing | consulting | development Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
Re: batch deleting backup files
It's been a while since I messed with .BAT, but... Perhaps adding a master path and /s to catch the subdirectories would do the trick: @echo off echo. echo Deleting the following files from the current directory: cd [MainPathForFMfiles] dir *.backup.* *.lck /s echo. del *.backup.* *.lck /s HTH Rene Stephenson Syed Zaeem Hosain <[EMAIL PROTECTED]> wrote: Hi, Mike. Mike Wickham wrote: >> Put the following into a file (named with extension .BAT): >> >> @echo off >> echo. >> echo Deleting the following files from the current directory: >> dir *.backup.* *.lck >> echo. >> del *.backup.* *.lck >> >> and that will do the trick when you execute the batch program in a >> DOS window or from the Run command line. > > Even easier, put a shortcut to the batch file on your desktop or > elsewhere, and click on it to run it. Uh ... I think that is not gonna work too well, if you are in the wrong directory (your desktop?) when you run it. In fact, I think my previous advice to use the Run command line has the same problem! Oops. So, best to have it in a folder that is in your path and then execute it from a DOS window in the correct directory. As, also mentioned by others for the DEL command, if you want all backup files in a directory tree removed, you can add the /S switch. What was not mentioned is that you can add that switch to the DIR command too! BTW, I would be very careful of the /S switch ... if you are in the wrong folder. When I tried it from my C:\ root, it found some files that I would not want deleted (without knowing what they were)! Z ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/rinnie1%40yahoo.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info. ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
batch deleting backup files
It's been a while since I messed with .BAT, but... Perhaps adding a master path and /s to catch the subdirectories would do the trick: @echo off echo. echo Deleting the following files from the current directory: cd [MainPathForFMfiles] dir *.backup.* *.lck /s echo. del *.backup.* *.lck /s HTH Rene Stephenson Syed Zaeem Hosain wrote: Hi, Mike. Mike Wickham wrote: >> Put the following into a file (named with extension .BAT): >> >> @echo off >> echo. >> echo Deleting the following files from the current directory: >> dir *.backup.* *.lck >> echo. >> del *.backup.* *.lck >> >> and that will do the trick when you execute the batch program in a >> DOS window or from the Run command line. > > Even easier, put a shortcut to the batch file on your desktop or > elsewhere, and click on it to run it. Uh ... I think that is not gonna work too well, if you are in the wrong directory (your desktop?) when you run it. In fact, I think my previous advice to use the Run command line has the same problem! Oops. So, best to have it in a folder that is in your path and then execute it from a DOS window in the correct directory. As, also mentioned by others for the DEL command, if you want all backup files in a directory tree removed, you can add the /S switch. What was not mentioned is that you can add that switch to the DIR command too! BTW, I would be very careful of the /S switch ... if you are in the wrong folder. When I tried it from my C:\ root, it found some files that I would not want deleted (without knowing what they were)! Z ___ You are currently subscribed to Framers as rinnie1 at yahoo.com. Send list messages to framers at lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscribe at lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/rinnie1%40yahoo.com Send administrative questions to listadmin at frameusers.com. Visit http://www.frameusers.com/ for more resources and info.
batch deleting backup files
>>> and that will do the trick when you execute the batch program in a >>> DOS window or from the Run command line. >> >> Even easier, put a shortcut to the batch file on your desktop or >> elsewhere, and click on it to run it. > > Uh ... I think that is not gonna work too well, if you are in the wrong > directory (your desktop?) when you run it. In fact, I think my previous > advice to use the Run command line has the same problem! Oops. Oops! You're right. The batch files I'm used to running are set to run on specific directories. I forgot that that one didn't specify the directory. Mike Wickham
batch deleting backup files
In the shortcut, you might want to specify the "Start In" directory. You can do this by finding your batch file, right-clicking and selecting "Create Shortcut," then right-clicking on the Shortcut and filling in the "Start In" field with the desired target directory. --- Mike Wickham wrote: > >> Even easier, put a shortcut to the batch file on your desktop or > >> elsewhere, and click on it to run it. http://technical-writing.dionysius.com/ technical writing | consulting | development Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/
Re: batch deleting backup files
and that will do the trick when you execute the batch program in a DOS window or from the Run command line. Even easier, put a shortcut to the batch file on your desktop or elsewhere, and click on it to run it. Uh ... I think that is not gonna work too well, if you are in the wrong directory (your desktop?) when you run it. In fact, I think my previous advice to use the Run command line has the same problem! Oops. Oops! You're right. The batch files I'm used to running are set to run on specific directories. I forgot that that one didn't specify the directory. Mike Wickham ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
batch deleting backup files
> Put the following into a file (named with extension .BAT): > > @echo off > echo. > echo Deleting the following files from the current directory: > dir *.backup.* *.lck > echo. > del *.backup.* *.lck > > and that will do the trick when you execute the batch program in a > DOS window or from the Run command line. Even easier, put a shortcut to the batch file on your desktop or elsewhere, and click on it to run it. Mike Wickham
Re: batch deleting backup files
Hi, Mike. Mike Wickham wrote: Put the following into a file (named with extension .BAT): @echo off echo. echo Deleting the following files from the current directory: dir *.backup.* *.lck echo. del *.backup.* *.lck and that will do the trick when you execute the batch program in a DOS window or from the Run command line. Even easier, put a shortcut to the batch file on your desktop or elsewhere, and click on it to run it. Uh ... I think that is not gonna work too well, if you are in the wrong directory (your desktop?) when you run it. In fact, I think my previous advice to use the Run command line has the same problem! Oops. So, best to have it in a folder that is in your path and then execute it from a DOS window in the correct directory. As, also mentioned by others for the DEL command, if you want all backup files in a directory tree removed, you can add the /S switch. What was not mentioned is that you can add that switch to the DIR command too! BTW, I would be very careful of the /S switch ... if you are in the wrong folder. When I tried it from my C:\ root, it found some files that I would not want deleted (without knowing what they were)! Z ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
batch deleting backup files
Hi, Mike. Mike Wickham wrote: >> Put the following into a file (named with extension .BAT): >> >> @echo off >> echo. >> echo Deleting the following files from the current directory: >> dir *.backup.* *.lck >> echo. >> del *.backup.* *.lck >> >> and that will do the trick when you execute the batch program in a >> DOS window or from the Run command line. > > Even easier, put a shortcut to the batch file on your desktop or > elsewhere, and click on it to run it. Uh ... I think that is not gonna work too well, if you are in the wrong directory (your desktop?) when you run it. In fact, I think my previous advice to use the Run command line has the same problem! Oops. So, best to have it in a folder that is in your path and then execute it from a DOS window in the correct directory. As, also mentioned by others for the DEL command, if you want all backup files in a directory tree removed, you can add the /S switch. What was not mentioned is that you can add that switch to the DIR command too! BTW, I would be very careful of the /S switch ... if you are in the wrong folder. When I tried it from my C:\ root, it found some files that I would not want deleted (without knowing what they were)! Z
Re: batch deleting backup files
Put the following into a file (named with extension .BAT): @echo off echo. echo Deleting the following files from the current directory: dir *.backup.* *.lck echo. del *.backup.* *.lck and that will do the trick when you execute the batch program in a DOS window or from the Run command line. Even easier, put a shortcut to the batch file on your desktop or elsewhere, and click on it to run it. Mike Wickham ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
Re: batch deleting backup files
Put the following into a file (named with extension .BAT): @echo off echo. echo Deleting the following files from the current directory: dir *.backup.* *.lck echo. del *.backup.* *.lck and that will do the trick when you execute the batch program in a DOS window or from the Run command line. Z Dave Reynolds wrote: Hi Folks Someone posted the text for a batch file (or similar) recently for cleaning up backup files from a folder. I thought I had archived that information, but now I need it, I can't find it. I'd appreciate it if someone could send me the the information. Thanks Dave ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.
batch deleting backup files
Put the following into a file (named with extension .BAT): @echo off echo. echo Deleting the following files from the current directory: dir *.backup.* *.lck echo. del *.backup.* *.lck and that will do the trick when you execute the batch program in a DOS window or from the Run command line. Z Dave Reynolds wrote: > Hi Folks > > Someone posted the text for a batch file (or similar) recently for > cleaning up backup files from a folder. I thought I had archived that > information, but now I need it, I can't find it. I'd appreciate it if > someone could send me the the information. > > Thanks > > Dave
batch deleting backup files
Hi Folks Someone posted the text for a batch file (or similar) recently for cleaning up backup files from a folder. I thought I had archived that information, but now I need it, I can't find it. I'd appreciate it if someone could send me the the information. Thanks Dave -- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ Dave Reynolds Phone: (64) (3) 358 1029 Senior Technical Author Fax: (64) (3) 359 4632 Tait Electronics Ltd Email: [EMAIL PROTECTED] PO Box 1645 Christchurch New Zealand === This email, including any attachments, is only for the intended addressee. It is subject to copyright, is confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission. If the receiver is not the intended addressee, please accept our apologies, notify us by return, delete all copies and perform no other act on the email. Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission. === ___ You are currently subscribed to Framers as [EMAIL PROTECTED] Send list messages to [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to [EMAIL PROTECTED] Visit http://www.frameusers.com/ for more resources and info.