The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Q: Renaming files on file-system

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hajo_old 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
4   L A T E S T    R E P L I E S    (Newest First)
cpyang 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


Mike Buess 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
hajo_old 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 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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000