[Solved] Calc File listing

Discuss the spreadsheet application

[Solved] Calc File listing

Postby mandrill » Wed Apr 11, 2012 3:55 pm

Hi there, wasn't sure where to put this, feel free to move if necessary.

I'm currently working on preparing data for use in the backend of an e-commerce website and I need to make sure that I have the required images for each item that will be sold on the website. This is not something that can be done manually in a timely fashion (over 1800 items with 4 images each).

What I'd like to do is get a listing of every image file I have in a directory (and sub-dirs) and output that to a calc spreadsheet for comparison to the data I have for each item.

as far as I can see this would require a few steps.

1. Producing a spreadsheet which lists each file separated into columns for the image sizes (XL zoom, Lg, Med, sm)
2. Checking the list of items (each with a unique SKU) against each file name (XXXXX_<size>.jpg eg TW0373_xl.jpg) ignoring the size designation part of the filename)
3. Output a spreadsheet where each item is listed along with whether the relevant size image exists.

Steps 2 and 3 I can do but I can't figure out how to get the list of files in the first place. Any suggestions?

(I've had a look at other topics which seem to address this issue but they're not much help.)
Last edited by mandrill on Thu Apr 12, 2012 10:01 am, edited 1 time in total.
OOo 3.3.0 | Windows Vista Business 32bit SP2
mandrill
 
Posts: 10
Joined: Mon Nov 28, 2011 12:00 pm

Re: Calc File listing.

Postby acknak » Wed Apr 11, 2012 6:38 pm

In Linux it's a snap; on Windows, I don't know. The same principle applies for both: use the command line to get a directory listing in a text file, then import the text file, but I don't know how to get the listing in a useful layout in WIndows, and I can't test it to make a suggestion. Maybe someone else can tell you.

Alternataively, if you can use a macro, this may do the trick: viewtopic.php?f=21&t=41231
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Calc File listing.

Postby RoryOF » Wed Apr 11, 2012 6:41 pm

Apache OpenOffice 4.1.7 on Xubuntu 18.04.4 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31112
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calc File listing.

Postby Hagar Delest » Wed Apr 11, 2012 8:38 pm

Does it help: DIRECTORY LIST - files or folders to Calc?
For installation, see Tutorial: How to install a code snippet.

Please add '[Solved]' at the beginning of your first post title (edit button) if your issue has been fixed.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28892
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Calc File listing [Solved]

Postby mandrill » Thu Apr 12, 2012 11:52 am

Thanks guys. much appreciated. :D
OOo 3.3.0 | Windows Vista Business 32bit SP2
mandrill
 
Posts: 10
Joined: Mon Nov 28, 2011 12:00 pm


Return to Calc

Who is online

Users browsing this forum: No registered users and 9 guests