WinAPI::copyFile() Method
To continue on with my post about the WinAPI class I thought I would post about something I used today! The WinAPI::copyFile() method. This is a great little method, that came in handy for me today, when I had to copy files to a location from within X++. The Method looks something like this:
WinAPI::copyFile(str _strFile, str _newfile, [boolean _overwrite])
With Example as:
WinAPI::copyFile("c:\\test.txt","c:\\temp\\test.txt",true);
Look for more post soon!
Find a job at: www.DynamicsAXJobs.com
WinAPI::copyFile(str _strFile, str _newfile, [boolean _overwrite])
With Example as:
WinAPI::copyFile("c:\\test.txt","c:\\temp\\test.txt",true);
Look for more post soon!
Find a job at: www.DynamicsAXJobs.com
3 Comments:
using WinAPI::copyfile() method is it possible to copy xml files(with overwritting).I tried with .txt.doc wtc,its working fine but has anybody tried for xml files????
Thanks Brandon for this winapi copy tricks. That's usefull to me! Better than write twice the records ...
2 Papu : Xml files are nothing else than txt files ... thus it should work perfectly. Go on ! ^^
Shusss !
°J°c
Hi All,
In addition to the copyFile(), there are a no. of methods that can be used regarding files and directory.
Like checking if the folder exists, if the file exists at a given path, creating a folder etc.
Rahul
Post a Comment
<< Home