Removing OLD images from Pictures directory

Is there any way to automatically remove images from the pictures 
directory for all inactive items?

I have a bazillion images in that directory from really old inactive 
items that we are never going to restock....discontinued items, etc.

There is absolutely no way we can do this manually. Too much manpower.

like
if inactive date was over a year ago, then delete image?

I haven't been able to find any posts about this. Surely this is a 
problem for others?

help?

Mickie
0
mickie3724 (132)
2/24/2009 6:11:52 PM
pos 14173 articles. 0 followers. Follow

3 Replies
487 Views

Similar Articles

[PageSpeed] 37

create your list with a SQL statement like this:

select picturename from item where inactive=1 and picturename<>''

export the list to a text file in the picture directory, then your dos 
statement to delete the files would look something like this:

for /f "tokens=1 delims=" %a in (pictures.txt) do del "%a"

"Mickie" wrote:

> Is there any way to automatically remove images from the pictures 
> directory for all inactive items?
> 
> I have a bazillion images in that directory from really old inactive 
> items that we are never going to restock....discontinued items, etc.
> 
> There is absolutely no way we can do this manually. Too much manpower.
> 
> like
> if inactive date was over a year ago, then delete image?
> 
> I haven't been able to find any posts about this. Surely this is a 
> problem for others?
> 
> help?
> 
> Mickie
> 
0
Hurst1 (1)
2/24/2009 11:00:01 PM
Matt,

You are not unlike a god.

Do you have a paypal account I can send some money to?
You have no idea how much time that just saved me!

Is there a way to do the opposite?
I make a list of all the ACTIVE files and delete all that are NOT on the 
list?

Thanks!!!!!!

Mickie


Matt Hurst wrote:
> create your list with a SQL statement like this:
> 
> select picturename from item where inactive=1 and picturename<>''
> 
> export the list to a text file in the picture directory, then your dos 
> statement to delete the files would look something like this:
> 
> for /f "tokens=1 delims=" %a in (pictures.txt) do del "%a"
> 
> "Mickie" wrote:
> 
>> Is there any way to automatically remove images from the pictures 
>> directory for all inactive items?
>>
>> I have a bazillion images in that directory from really old inactive 
>> items that we are never going to restock....discontinued items, etc.
>>
>> There is absolutely no way we can do this manually. Too much manpower.
>>
>> like
>> if inactive date was over a year ago, then delete image?
>>
>> I haven't been able to find any posts about this. Surely this is a 
>> problem for others?
>>
>> help?
>>
>> Mickie
>>
0
mickie3724 (132)
2/25/2009 2:39:37 PM
the list of active items with pictures would start with this sql statement:

select picturename from item where inactive=0 and picturename<>''

export that to pictures.txt in your folder, then your dos commands:

md temp
for /f "tokens=1 delims=" %a in (pictures.txt) do move "%a" temp
del *.* /q
move temp\*.* .
rd temp

If that works, you can rate the post as 'answer' to the question, thanks.

"Mickie" wrote:

> Matt,
> 
> You are not unlike a god.
> 
> Do you have a paypal account I can send some money to?
> You have no idea how much time that just saved me!
> 
> Is there a way to do the opposite?
> I make a list of all the ACTIVE files and delete all that are NOT on the 
> list?
> 
> Thanks!!!!!!
> 
> Mickie
> 
> 
> Matt Hurst wrote:
> > create your list with a SQL statement like this:
> > 
> > select picturename from item where inactive=1 and picturename<>''
> > 
> > export the list to a text file in the picture directory, then your dos 
> > statement to delete the files would look something like this:
> > 
> > for /f "tokens=1 delims=" %a in (pictures.txt) do del "%a"
> > 
> > "Mickie" wrote:
> > 
> >> Is there any way to automatically remove images from the pictures 
> >> directory for all inactive items?
> >>
> >> I have a bazillion images in that directory from really old inactive 
> >> items that we are never going to restock....discontinued items, etc.
> >>
> >> There is absolutely no way we can do this manually. Too much manpower.
> >>
> >> like
> >> if inactive date was over a year ago, then delete image?
> >>
> >> I haven't been able to find any posts about this. Surely this is a 
> >> problem for others?
> >>
> >> help?
> >>
> >> Mickie
> >>
> 
0
MattHurst (182)
2/25/2009 7:14:01 PM
Reply:

Similar Artilces:

Remove Excel Icon ??
Hi, I would like to remove the possibility to export data in Excel. I think I already read it's impossible but I just want to confirm. Thanks, Sylvie Your correct, there is no supported way to do this in the current release of Microsoft CRM 1.2 -- John O'Donnell Microsoft CRM MVP http://www.microsoft.com/BusinessSolutions/Community/CRMFaqLanding.aspx "sylvie" <sylvie.mondoux@proximi-t.com> wrote in message news:09dd01c47b03$d3627560$a301280a@phx.gbl... > Hi, > > I would like to remove the possibility to export data in > Excel. I think I already rea...

exchange "directory lookup " problem
dear mvp i have one domain and sub-domain , two domain also is win2k3 + exchange2k3 sp2 in these few day , my sub-domain exchange have problem ,all mail can't forward to root domain , all is hold on " server " " queues" " messages awaiting directory lookup " but can send out & receive out-bound mail in sub-domain exchange is work just internal mail not work can't send & receive to root-domain if anyone one know , pls help me thank your very much On Mon, 3 Jul 2006 16:53:51 +0800, <tequila529@gmail.com> wrote: >dear mvp ...

Removal
How do I completely remove all traces of Outlook 2002 for a complete fresh reinstall. I can't find anything for '02. HELP!!!!!!!!!!!!!!!!! ...

No image in Read Only encrypted document
I created a Word 2007 .docm file using "General Options" to require a password to open the document. This was created using Office 2007 Windows XP Pro SP3 32bit. I subsequently installed Windows 7 on this machine, and re-installed Office 2007. When I open this document in Word, if I select "read-only", in place of the image (there is only one) is and error message with a red x in the corner: "The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then ope...

Remove lines with +++
Is there anyway to find any line that has a + in it and delete that whole line?! I'd also like to do the same for *. I have a list of about 1300-1500 names and addresses. Some of them have a few +++ next to the name and some of them have a few *** next to the name. These were put there by the company to designate things. They need to be removed from the list, but it's a lost of work doing it one by one. You could apply an autofilter to the column with these characters in and from the pull-down select Custom - in the panel choose "Contains" (scroll down for this) the...

how do I remove spaces from cells that were pasted
I am pasting numbers into a spreadsheet, however its treating them as text because there is a space before the number. How do I remove the space so it treats it as a number ? I have used the =trim() function and its not working. Thanks for any help ! Hi! It sounds like you're copy/pasting from a website. Try this macro from David McRitchie. Look for TRIMALL, it's about half way down the page: http://www.mvps.org/dmcritchie/excel/join.htm Biff >-----Original Message----- >I am pasting numbers into a spreadsheet, however its treating them as text >because there is a...

Exchange 5.5 moving into Active Directory
I need to know if I can move Exchange 5.5 into Active Directory 2003. If so is there anydocumentation somewhere for me to see. Joel: The tool you are looking for (if you are looking for a Microsoft tool) is the Active Directory Connector (the ADC). It is found on the Exchange 2003 CD-ROM or the Exchange 2003 Service Pack 1 CD or download (in the ADC directory). There are dozens of possible permutations for implementing the ADC. It will all depend on your environment. Usually (but not always), the ADC assumes that your user accounts are already created in the Active Dire...

image list
hi, i want to list images using a list box. can i use CImageList for .gif images? anu ...

Document Imaging Writer and Publisher--incorrect number of pages? #2
When I scanned a document from Publisher using Microsoft Document Imagining Writer, it scanned 4 pages into 2 and lost some content. Don't know why this happened or how to fix it. Please advise. Thanks ...

How to Remove SRS
How to I remove or disable Site Replication Service (SRS) from my Exchange 2003? Thank You, Jason HI Remove the SRS by expanding the Tools node in ESM, right-clicking Site Replication Service, and clicking Delete "jpollock" wrote: > How to I remove or disable Site Replication Service (SRS) from my Exchange > 2003? > > Thank You, > > Jason > > And make sure you are doing it while logged in to the console of the Exchange server on which the SRS is running. -- Jim McBee Web: http://www.somorita.com Blog: http://mostlyexchange.blogspot.com &...

Cannot Remove a program from Add Remove via remove.
I downloaded a program Fast At Last and it did not download properly and I could not remove it. Even System Restore did not remove it. The program is listed as 924PL32. Kept getting messages The feature you are trying to use is on a network resource that is unavailable. C:\dell\GC605. Seems Dell is the publisher but they would not give me free support on this issue. Any suggestions as to how I can remove the program? I believe it may be associated with spyware. When I ran spysweeper it removed some Rouge Security products but I still cannot remove this program. Cor...

Removing an item from menu
How can I remove an item from the menu and add some thing else. For instance, how can I remove inactive from the menu in contact page and put some other item with my own code behind it? You can hide the public views by simply creating a team (non used views or whatever you want to name it) and share the view to that team(done in the customize entity fields in the forms and views), this will make it a private view that only members of that team can see. You can also create new public or private views in the same place. "Amin" wrote: > How can I remove an item from the m...

how to send HTML e-mails with images?
I can't figure out how to set up an HTML newsletter (i.e. same format each time) to send via e-mail. I receive these things all the time and I know how to create HTML web pages, but I can't figure out how to send an e-mail from Outlook that is basically formatted like a web page, which calls images from a server (rather than attached)...can anyone help? Depends how complex you want the email, there is an easy way using Outlooks add a signature. send me a email ross@trainingcomputersolutions.co.uk, I will show you >-----Original Message----- >I can't figure out how to set u...

allmost done with removing our 1st exchange 03 server
We are in the process of removing the 1st exchange server in our domain. Everything has been replicated over to a new server and all mailboxes have been moved. When we shut down the original server down, email still works great for 90% of the team. For the rest of us, when type the name of person to receive an email, outlook it still tries to resolve the name on the original server. I checked the profile on the users mailbox and it shows them pointing to the new server. Any suggestions would be appreciated. Try creating a new Outlook profile. Also, when you shut down you're...

remove Fax from address book?
Is there a way to stop showing Fax in the address book? I have a lot of fax numbers in my Contacts. I do not want to loose them - just not show them in the Address Book. thx Outlook considers fax numbers to be valid electronic addresses, since there are many client- and server-based components that can use such addresses. One method to hide fax numbers from the address book is to prefix the fax number with one or more letters (maybe B for business fax, H for home, O for other). If the fax number begins with a letter, Outlook won't show it in the address book. There are a couple of t...

old A97 code?
I just recently converted a database from A97 to A2K2. I keep getting the error, "User-defined type not defined". I've check the references and the old database when opened in 97 lists: -VBA -MSAccess 8.0 Object Library -Microsoft DAO 2.5/3.5 Compatibility Library -utility After importing all tables, forms, ect into an A2K2 new database I attempted to match the references as close as possible to: -VBA -MSAccess 10.0 Object Library -MS DAO 3.6 Object Library I'm still getting that same error all over the place. I looked at the code and it looked a little old but wasn'...

Need to remove selected characters
I have 25000 cells with map coordinates in it in the following format: N34* 51.87' I need the data in the following format: N55 13.26 So basically I need to strip out the * and ' from each cell. Any simple way to do this? I sure would appreciate any assistance. Thank you -- Dale Hi! Select the range of cells in question. Goto Edit>Rplace Find what: ~* Replace with: nothing, leave this blank Replace All Repeat the process for the ' It's VERY important that you select the specific range before you attempt this!!!!!!! Biff "Natedanger" <Natedanger@d...

Remove deduction code from payroll stub
Is it possible to remove just a single payroll deduction code from a payroll stub using 'Employee Checks Stub on Top-D'? For example, an employee has three deductions: Insurance, 401k, Medical. Would it be possible then to show insurance and 401k but leave medical off the check stub for all employees who have medical? Thanks in advance for your help! I don't believe so because the deduction field is an array so you'd have to know which array value. Even if you did, I don't think you can use arrays in report restrictions. -- Charles Allen, MVP "drose03...

How to Remove Yahoo toolbar
I have three toolbars installed on IE8-Yahoo (to the right of the address box), and Google and AVG below the address box. I want to uninstall the Yahoo toolbar but how? It is not listed under 'Add/Remove' programs and there is a magnifying glass and arrow to the right of this toolbar that says 'Manage search providers' so I removed Yahoo toolbar from there but it is still showing. I uninstalled Yahoo messenger (since the toolbar was included during the Messenger install so it would be removed by deleting Messenger) but it is still there. I know that for AV...

Removing password protection on a sheet
A co-worker of mine protected a sheet in her workbook but lost th password. I help her with formula/script issues and I thought I coul simply copy the data on this sheet and paste it to another sheet to ge around it, but it won't let me select anything other than a few cell (based on the cells settings I'm sure). I know that Microsoft doesn' support removal of passwords when you don't know the password (make sense from a secuity standpoint) but was hoping someone could help m out here. She can remake it if need be but thought I'd ask ;) Thanks -- Otto.ts ------------...

Picture in signature HELP
Ho do I add a jpeg in my signature? I have added on to my signature file but when I add my signature to the email, I get a empty box with a red X in it. Is this some security setting. HELP -- Mike Crawford Mike <Mike@discussions.microsoft.com> wrote: > Ho do I add a jpeg in my signature? I have added on to my signature > file but when I add my signature to the email, I get a empty box with > a red X in it. Is this some security setting. HELP See if something here helps: http://www.howto-outlook.com/Howto/signatures.htm -- Brian Tillman >-----Original Message-----...

how do you insert pictures into tables?
I want to make a table with the first row being the "Header". On the next row, I want to be able to insert a picture in the cell that will automatically format the cell to the size of the picture. Does that make sense? I basically want a placeholder for the picture but I want it INSIDE the table and I can not get it to do that. Thanks so much for your help and suggestions! With your cursor in the cell, fill, fill effects, picture tab. This will put the picture in the cell, Publisher does not automatically format the image to the cell size. You can manually resize the cell....

Removing old computers connector exchange 2003
Hi, I have a new exc 2003 server that is working fine. i keep getting errors in the event log that it cannot connect to an old exchange server that was removed. for some reason, in the connectors, i can see two connectors that point for the old server. connector for ms scheduleplus(oldservername) connector for ms mail (oldservername) i cannot delete them from there. what can i do? Omer On 4 Oct 2006 23:43:14 -0700, "etgarnet" <etgarnet@zahav.net.il> wrote: >Hi, > >I have a new exc 2003 server that is working fine. >i keep getting errors in the event log that ...

Transparent background of pictures or images on forms
How do I get my picture or image to use a transparent background after I insert them into forms? I have been using transparent Gif files and even Bmp images with 256 or 16 colors. But depending on the resolution/colors of my computer display, it may not show as the standard buttonface (system color -#) of forms. Did the Microsoft development team miss this or is there anyway I can accomplish this so basic task? I'm using Access 2002 (XP) AFAIK, Access 2007 does this, but earlier versions don't. Here's a workaround: http://www.lebans.com/transparent.htm -- Allen Br...

make outlook automatically delete html mail with linked images
The junk mail filter should be able to automatically delete html mail with linked images ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/community/en-us/default.mspx?mid=9e1b783b-c9c1-44f2-a1dd-93da59216c56&dg=microsoft.public.outloo...