Author |
Topic  |
|
hajo_old
Germany
141 Posts |
Posted - 03/17/2003 : 05:17:11 AM
|
Hello, all
for my project I need to search some files on my hard disk, check their names and eventually rename them according to my needs.
In OriginC I find some functions for accessing (opening, reading, writing) files, but not "only" renaming the filename, without the "workarround" to open the source, read it in, creating the new file (with new name) and writing the source to the target.
How can I simply rename a file by using OriginC or LabTalk? Thanks Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 |
|
Mike Buess
USA
3037 Posts |
Posted - 03/17/2003 : 07:38:13 AM
|
Hi Hajo,
First, make a copy with this LabTalk command... file -c "srcPath\Name" "destPath\Name";
Next, delete the original in OriginC... DeleteFile("srcPath\Name");
Mike Buess Origin WebRing Member |
 |
|
hajo_old
Germany
141 Posts |
Posted - 03/17/2003 : 08:12:51 AM
|
Hi Mike
thanks, as we here in Germany say: I don't see the forrest because of all these trees!! (Is there something like that in English?)
But a pure OriginC sollution isn't possible?!
Hajo
-- -- Dipl.-Ing. Hans-Joerg Koch Siemens VDO, Regensburg
SVDO_Origin1 |
 |
|
Mike Buess
USA
3037 Posts |
Posted - 03/17/2003 : 08:30:09 AM
|
Hi again,
>thanks, as we here in Germany say: I don't see the forrest because of all these trees!! (Is there something like that in English?)
Yes, it's nearly a direct translation. 
>But a pure OriginC sollution isn't possible?!
Not that I am aware of. Not yet, at least.
Mike Buess Origin WebRing Member |
 |
|
cpyang
USA
1406 Posts |
Posted - 03/17/2003 : 09:07:43 AM
|
The following has been added and will appear in SR4, which should become available in a week or sooner.
BOOL RenameFile(LPCSTR lpcszNewFilename, LPCSTR lpcszOldFilename);
CP
|
 |
|
|
Topic  |
|