Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy a folder 1

Status
Not open for further replies.

lemonjuice

Programmer
Jun 12, 2003
62
ZA
How do i copy a folder in the file system with paradox code?
 
You could use:

1. Zip. Zip the folder to a file, then unzip to the new directory.
2. enumfilelist, then iterate through the list (array) and copy each file.
3. Use Copy or XCopy DOS command from Paradox.

These are the three that have been suggested elsewhere as the best options/solutions.


Tony McGuire
 
Thanx for the reply.

Can you give me a syntax example of xCopy used in paradox. I cannot call a .bat file, because i am obligated to use aliases in paradox where the files should be copied to and i can't pass my alias to DOS, or can i?
 
Thinking about this a bit more...

You'll more likely need textstream.writestring()

textstream.writestring("xcopy c:\\dir\\subdir "+textstream.writestring(getaliaspath(":alias:"))

And depending on your flavor of Windows, you may need 'cmd.exe /c' at the start.

Tony McGuire
 
Hi,

I execute a Paradox script that calls out to a batch file. The script has syntax similar to this

execute("M:\\Information\\HURMIS\\letters.bat")

and the batch file has syntax similar to the two parts below

md "D:\Program Files\Corel\Paradox 9 Runtime\programs\forms"

Copy M:\Information\Hurmis\PayImport\Forms\*.* "D:\Program Files\Corel\Paradox 9 Runtime\programs\forms"

Bystander

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top