|
-
October 29th, 1998, 02:54 PM
#1
Copy file to different dir
HELP:
I am writing this program and am stuck.
What i am trying to do is prompt user for pathname: d:\data\data.lst and also folder he wants to transfer the file too : s:\data\. Also i want to change filename from data.lst to YYMMDD_HHMM.lst (e.g. 981027_1089.lst)
anybody know any good code or how to do this ??
Farhan
-
October 29th, 1998, 04:09 PM
#2
Re: Copy file to different dir
Hi,
Dim input_file as string
Dim output_dir as string
Dim output_file as string
input_file = "d:\data\data.lst"
output_dir = "s:\data\"
output_file = "981029_2156.lst"
filecopy inputfile, output_dir & output_file
that's all
Cya
__Neph__
-
October 30th, 1998, 10:37 AM
#3
Re: Copy file to different dir
>>output_file = "981029_2156.lst" <<
but i want the file name to be changed everyday
farhan
-
October 30th, 1998, 03:00 PM
#4
Re: Copy file to different dir
re,
you can use the date() function, here's an example
Dim mystr As String
mystr = "Toto"
mystr = Date() & "_" & mystr
on my system the result should be : (it depends of your date format - see regional settings in your Control Panel)
mystr => "30/10/98_Toto"
cya
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|