07-26-2007, 04:24 PM
i am trying 2 create a file but have the name on the file be the current date. i can create the file just can't get it the name of the file 2 be the date it was made.
file creation naming
|
07-26-2007, 04:24 PM
i am trying 2 create a file but have the name on the file be the current date. i can create the file just can't get it the name of the file 2 be the date it was made.
07-26-2007, 04:35 PM
s.setfile("$Desktop$\test\.txt" -1 -1 1)<is the code i am using but what i need is the file name 2 be the current date
07-26-2007, 04:36 PM
Use the Text dialog to format the filename string. Make sure it does not contain / and other characters that cannot be used in filenames. At first store it into a variable, then use the variable with setfile.
07-26-2007, 04:42 PM
i am trying just can't seem 2 work it out can u give an example please
07-26-2007, 04:52 PM
07-26-2007, 04:54 PM
try this.
str a b You can see more about 'from' on my blog at http://themacrohook.blogspot.com/search/label/from
07-26-2007, 04:56 PM
ty so much now i see what i was doing wrong
![]()
07-30-2007, 01:24 PM
I'm haviing trouble now that i changed something.i have made the folder now have the current date on it.and the filename is a window text.but the problem i am having is getting it 2 find the folder with the current date on it .
07-30-2007, 01:52 PM
i am trying this 4 example as a code
but i get::::Error (RT) in Function1: cannot open or create file: The system cannot find the path specified. str a b str ft.time("$desktop$\test\%m-%d-%y") mkdir(ft) a="this is the file contents" b.getwintext(win("Instant Message" "YSearchMenuWndClass")); err b.from("$desktop$\test\" ft "\" b ".txt") out b a.setfile(b)
07-30-2007, 04:24 PM
how can i get it 2 find the folder with the the current date? i can create it just can't save the file in that folder
07-30-2007, 05:44 PM
looks to me like you're putting in the path twice.
str a b str ft.time("$desktop$\test\%m-%d-%y") mkdir(ft) a="this is the file contents" b.getwintext(win("Instant Message" "YSearchMenuWndClass")); err b.from("$desktop$\test\" ft "\" b ".txt") out b
07-30-2007, 06:20 PM
the file is being created inside another folder on my desktop
07-30-2007, 06:24 PM
ok here is what i am trying 2 do i am creating a folder on my desktop then creating another foler inside that.then trying 2 save a file in2 the second folder.
07-30-2007, 06:59 PM
i'd stay away from the whole '$desktop$' paths and just go with the actual names
c:\doc....etc. here's what you're trying to do... $desktop$\test\$desktop$\test\07-30-07\.txt and that's why you're getting the error.
07-30-2007, 07:13 PM
ok i see what your saying why is that coming up like that? but the issue i have is this file will be on different computers with different user names
07-30-2007, 07:16 PM
if you look at the underlined portions above, you'll see that youre putting it in twice.
07-30-2007, 07:17 PM
ok i found the error it was declaring the desktop twice
changed code 2 this and it worked b.from("" ft "\" b ".txt") |
« Next Oldest | Next Newest »
|