files on external drives

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: files on external drives

Post by mustafa »

hi edk <--- :idea:

Works great for backing up from one folder to another
I have put this little change the rest the same, Everything Ok!

Code: Select all

*Local cFile1:= "C:\BOOKS\AUTHORS.dbf"
*Local cFile2:= "E:\BOOKS\AUTHORS.dbf"

 Local cFile1 := HB_Curdrive() +":\"+Rtrim(Curdir() ) + "\"+"Facturas_PdF\TRANS.DBF" 
 Local cFile2 := HB_Curdrive() +":\"+Rtrim(Curdir() ) + "\"+"Control_Back\TRANS.DBF" 
 Local nSuccess

CLOSE DATA
IF !File ( cFile1 )
	MsgStop ( " .......
	.........
	........
thanks for the Sample

Regards
Mustafa
Templar
Posts: 51
Joined: Sun Apr 01, 2018 5:37 pm
DBs Used: DBF

Re: files on external drives

Post by Templar »

This is very odd! So I get a failure and for everybody else it works!
I know that it is copying the files ok, because I can see them in File explorer; it just doesn't want to open them.
I'm using Windows10; is everyone else?
Templar
User avatar
serge_girard
Posts: 3166
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: files on external drives

Post by serge_girard »

W7 works fine!

Serge
There's nothing you can do that can't be done...
franco
Posts: 818
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: files on external drives

Post by franco »

Templar,

I still do everything old school, lack of time to learn a lot of new coding
Your table must have 1 record and data in first two fields.


a:= getcurrentfolder()+'\acmotor.dbf' //acmotor is your table name
b:= 'd:\acmotor1.dbf'
copy file &a to &b
select 0
use &a alias ta
select 0
use &b alias tb
select ta // c drive table
c:=field(1)
msgbox(&c)
select tb // d drive table
d:=field(2)
msgbox(&d)

return

This works 3.44 Windows10

Everyone stay safe .
Franco
All The Best,
Franco
Canada
User avatar
AUGE_OHR
Posts: 2062
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: files on external drives

Post by AUGE_OHR »

hi,
Templar wrote: Thu Apr 02, 2020 2:33 pm This is very odd! So I get a failure and for everybody else it works!
I know that it is copying the files ok, because I can see them in File explorer; it just doesn't want to open them.
I'm using Windows10; is everyone else?
you seems to have a Strange Problem that can not be reproduce. :roll:
so i recommend to test same on other Hardware if you App work OK.
have fun
Jimmy
Post Reply