* Listing files in census folder

Homeless Posts from the old forum system
Locked
avatar
MartinA
Gold
Posts: 22
Joined: 17 Aug 2012 09:00
Family Historian: None

Listing files in census folder

Post by MartinA » 17 Aug 2012 09:47

For various purposes I want to be able to list all the files I have in e.g.
folder 'D:........Census Images1911'

I've managed to produce a script that runs using 'lfs', but I can't get an output.

It seems to be a fairly short script needed. Has anyone got a suggestion please?

Martin

ID:6442

avatar
Cambiz
Famous
Posts: 235
Joined: 26 Sep 2003 23:30
Family Historian: None

Listing files in census folder

Post by Cambiz » 17 Aug 2012 10:28

Image

I put this query together to try to sort out some multimedia files. Perhaps it could be a base for your requirement? Copy the output to a spreadheet if necessary.

User avatar
tatewise
Megastar
Posts: 16604
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Listing files in census folder

Post by tatewise » 17 Aug 2012 10:30

Martin, you do not say what form of output you want, or why you cannot get any output.

To just display on screen I think you could use the fhMessageBox() function.

Alternatively, you could create a Result Set using fhOutputResultSetColumn() and then you can Save or Print the Result Set.

avatar
MartinA
Gold
Posts: 22
Joined: 17 Aug 2012 09:00
Family Historian: None

Listing files in census folder

Post by MartinA » 17 Aug 2012 12:32

Cracked it now, thanks.

I was a bit brief. What I wanted was a list of files in my census folders, that is the downloads that I have, to match them against the people with that census in the project while within FH. I know I have a number that have not been entered and it's a pain chasing them.

The result will now show a list of all files in the year entered.

It's not suitable for anyone else because their file paths will be different.

Doubtlesss I shall be back again now I've started writing these things and found the forum.

Thanks again,
Martin

avatar
Bonzo
Diamond
Posts: 79
Joined: 06 Feb 2012 21:47
Family Historian: V5

Listing files in census folder

Post by Bonzo » 19 Aug 2012 12:27

It's not suitable for anyone else because their file paths will be different.
It might be interesting to see and others can rename their file path.

Anyway there are quite a few batch script file examples on Google showing how to do it. Search for window list folder contents

avatar
MartinA
Gold
Posts: 22
Joined: 17 Aug 2012 09:00
Family Historian: None

Listing files in census folder

Post by MartinA » 19 Aug 2012 16:13

I did try that and it got me nowhere because I couldn't find anything that fitted into the FH approach.

Anyway, see other thread fopr full details and it's available to anyone who is inteersted.

Martin

avatar
Bonzo
Diamond
Posts: 79
Joined: 06 Feb 2012 21:47
Family Historian: V5

Listing files in census folder

Post by Bonzo » 19 Aug 2012 19:25

If anyone is interested in a batch file I modified this from something found on the web.

You need to change the path to the folder you are saving the text file into.

Just drag and drop the folder you want to list over the icon.

You can chnage what is and is not displayed on line 1

@dir %1 /A /S > C:UsersAnthonyDocumentsdirListing.txt
@echo Opening C:UsersAnthonyDocumentsdirListing.txt in Notepad (Close notepad to delete file)
@notepad C:UsersAnthonyDocumentsdirListing.txt
@echo Deleting C:UsersAnthonyDocumentsdirListing.txt
@echo To keep the file comment out the next line with REM
@del C:UsersAnthonyDocumentsdirListing.txt
REM @pause

Use at own risk [wink]

Locked