brugmanrad
22nd July 2005, 09:55
Hello all,

I have following challenge:

Through ftp we import some files into a windows directory. These files have format 8.3 characters. Now I want to cut the name after the 8th position, so cut off the extension.

I checked functions like dir.open and dir.entry, but I cannot find what I exactly need to do for this.

I think it should work something like this:

open directory
read file
file.new = file.old(1;8)
read next file

Any suggestions are welcome, thanks in advance

mr_suleyman
22nd July 2005, 11:00
Hi There , I quickly search your problem . I think that you can use AFS functions like
declaration
#pragma used dll /bse/tools/ttB40_c1/ottdll/odllbw
program part:

client2server(filepath,"/filepath/newname.txt",true)

may be there is a another solution .
Good luck ..

giggig
22nd July 2005, 17:22
Hi brugmanrad,

to copy file u can use
long file.cp( const string source, const string target )

to delete first file 8.3
long file.rm( const string path )

or move file 8.3 to file 8 with
long file.mv( const string source, const string target )

Regards
Giuseppe

don't forget :
#pragma used dll ottdllbw