forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


File data help

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri Apr 04, 2003 7:53 pm    Post subject: File data help Reply with quote

Hi,

I can some one show me how to make a little script that will take any file, open the data up in a list (not visable) and then write all the data back to the file but with a different name?

thank you, i tried with binfile but it corrupts.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Apr 04, 2003 7:58 pm    Post subject: Reply with quote

This will open an ASCII-based file and save it. But it you are not going to
process it or anything you might as well just use FILE COPY,file1,file2 Smile

Code:
%%file   = C:\test.dat
%%output = C:\test2.dat

list create, 1
list loadtext, 1, %%file
list savefile, 1, %%output
list close, 1

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri Apr 04, 2003 8:01 pm    Post subject: Reply with quote

I play to do things with the file but i am trying to learn so i dont want you to give me all the code just help with the bits i get lost in.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Apr 04, 2003 8:03 pm    Post subject: Reply with quote

Well the code I gave should open all types of files except binary-type
files. Smile

Otherwise you would need to use BINFILE and I am still figuring that out.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri Apr 04, 2003 8:05 pm    Post subject: Reply with quote

That was my next question, what about bin files?
how can i do those too?
i need to be able to do it with all file types.
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 05, 2003 8:39 am    Post subject: Reply with quote

For binary files you can use the binfile command...
Back to top
View user's profile Send private message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Sat Apr 05, 2003 10:00 am    Post subject: Reply with quote

thats a good answer. I know i can use it but the really question is how?
just like freezingfire, im still getting to hang of binfile.
Back to top
View user's profile Send private message
nick
Contributor
Contributor


Joined: 15 Aug 2000
Posts: 50
Location: hamburg,nj

PostPosted: Sat Apr 05, 2003 2:11 pm    Post subject: Reply with quote

Hi:
Just a thought... Why not use the FILE RENAME command.

_________________
nick
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 05, 2003 3:20 pm    Post subject: Reply with quote

I think DW wants to open the file and do some processing and then save
the file to a different name. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Mon Apr 07, 2003 4:14 pm    Post subject: Reply with quote

you got it freezingfire.
i just about have the bin thing under control, almost.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group