Structure - change field order from command line

Forum for DBF Commander discussing.

Structure - change field order from command line

Postby straatvark » Mon Feb 10, 2014 10:51 am

Hi

Is it possible to change the order of fields in the file structure of a dbf file from the command line?

I have a couple of thousand dbf's that the same change need to be applied on. Would be much appreciated!

Regards, g
straatvark
 
Posts: 2
Joined: Tue Jan 28, 2014 6:01 pm

Re: Structure - change field order from command line

Postby Admin » Mon Feb 10, 2014 11:05 am

Hi,
yes, of course. You can do this with an SQL query in command-line mode. Just type fieldnames in the order you need in the SELECT clause. E.g.:
Code: Select all
dbfcommander.exe -q "SELECT field3, field1, field2 FROM 'D:\example.dbf' INTO TABLE 'D:\result.dbf'"

Please note that if the source DBF file type is dBase (not Visual FoxPro), then you should convert it back (if this matters for you) with -vfp command line parameter, as described here.
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 124
Joined: Wed Apr 21, 2010 7:27 pm

Re: Structure - change field order from command line

Postby straatvark » Mon Feb 10, 2014 11:18 am

brilliant, thanks!
straatvark
 
Posts: 2
Joined: Tue Jan 28, 2014 6:01 pm


Return to DBF Commander Professional

Who is online

Users browsing this forum: No registered users and 10 guests

cron