Posts:
1
Registered:
11/26/09
|
|
|
|
Can I use Mapbasic to copy images from one directory to another?
Posted:
Nov 26, 2009 7:47 AM
|
|
Hi all.
Well, this is a very quiet forum. Here's hoping there's some life left. :)
I manage the cleaning of graffiti. We record the graffiti with GPS enabled images using software on a Blackberry, and I use Mapinfo to manipulate the resulting data. I end up with a tab file that has many fields, including:
Ref number
An image filename
GPS location
Comments
...and more. And there's a single directory containing the images of the graffiti. Currently I have over 22,000 images in the one folder!
I want to use a Mapinfopro 10 map browser or a query to create a selection from this total database. Then I want some mapbasic that will look at the field "imagename" and then copy this image to a seperate folder of the users choice. I have (so far) seen no file manipulation functions in mapbasic, but this is my first day!
Can it be done?
The idea is to be able to provide police evidence or other examples of the images we have found without me having to manually search out the image and copy it. The last batch of evidence I did had 139 images, each searched out by numeric filename and hand copied to a seperate folder. Oh, my square eyes!
Thanks.
Mike.
|
|
|
Posts:
1
Registered:
1/12/10
|
|
|
|
Re: Can I use Mapbasic to copy images from one directory to another?
Posted:
Jan 12, 2010 11:50 AM
in response to: Michael Barnard
|
|
Hi Mike,
Yes it's possible but not with mapbasic itself. The way I do it is by using DLL's from windows. Here for example there is some MapBasic code to create a directory. You'll have to find DLLcode for any file handling action you'll need. But there are lot's of helpfull sites for that.
Create Dir example:
type SECURITY_ATTRIBUTES
nLength as integer 'DWORD in Windows
lpSecurityDescriptor as integer 'LPVOID in Windows
bInheritHandle as integer 'BOOL in Windows
end type
declare function CreateDirectory32 lib "Kernel32.dll" alias "CreateDirectoryA" (byval sPath as string, tSecurity as SECURITY_ATTRIBUTES) as integer
nStatus = CreateDirectory32 ("D:\Test_Dir" , tSecurity)
Regards,
Gertjan
|
|
|
|
Posts:
3
Registered:
2/5/10
|
|
|
|
Re: Can I use Mapbasic to copy images from one directory to another?
Posted:
Feb 5, 2010 12:00 PM
in response to: Gertjan Slob
|
|
[nobr]hello guys ...its really nice and informative post....i just liked it....thanks for your information guys ...........
<table border="0" cellspacing="0" cellpadding="0" width="72" style="border-collapse: collapse; width: 54pt"> <tbody> <tr height="20" style="height: 15pt"> <td class="xl66" width="72" height="20" style="height: 15pt; width: 54pt">
buick park avenue superchargers
</td> </tr> </tbody></table>
[/nobr]
|
|
|
|
Posts:
1
Registered:
6/5/10
|
|
|
|
Re: Can I use Mapbasic to copy images from one directory to another?
Posted:
Jun 5, 2010 8:22 AM
in response to: Michael Barnard
|
|
[nobr]
hello guys ...
its really nice post....
i just liked it....
thanks....
<table border="0" cellspacing="0" cellpadding="0" width="573" style="border-collapse: collapse; width: 430pt"> <tbody> <tr height="20" style="height: 15pt"> <td class="xl72" width="573" height="20" style="height: 15pt; width: 430pt">
chambery ski transfers
</td> </tr> </tbody></table>
[/nobr]
|
|
|
|
Posts:
1
Registered:
6/19/10
|
|
|
|
Re: Can I use Mapbasic to copy images from one directory to another?
Posted:
Jun 19, 2010 3:08 PM
in response to: Michael Barnard
|
|
[nobr]hi !!!
its really a informative post...
thanks for your information ...........
<table border="0" cellspacing="0" cellpadding="0" width="191" style="border-collapse: collapse; width: 143pt"> <tbody> <tr height="17" style="height: 12.75pt"> <td class="xl65" width="191" height="17" style="height: 12.75pt; width: 143pt">
pottery bowl
</td> </tr> </tbody></table>
[/nobr]
|
|
|
|
Legend
|
|
Helpful Answer
|
|
Correct Answer
|
|