Connecting Tech Pros Worldwide Forums | Help | Site Map

Creating Directories

tkal2k@gmail.com
Guest
 
Posts: n/a
#1: Feb 14 '06
i want to create a directory in a certain subfolder, but here's the
catch

each entry in my database is assigned an autonumber

i want to be able to create a new directory when i press a button on
each entry form, and have the directory be named from information in
each entry.

(" e.g. c:\3000\'autonumber' 'name' ")

also if anyone knows how to take a standard word or excel file, like
say for a fax cover sheet, and automatically copy it into a directory.


any help would be great!

Tony


Br@dley
Guest
 
Posts: n/a
#2: Feb 15 '06

re: Creating Directories


tkal2k@gmail.com wrote:[color=blue]
> i want to create a directory in a certain subfolder, but here's the
> catch
>
> each entry in my database is assigned an autonumber
>
> i want to be able to create a new directory when i press a button on
> each entry form, and have the directory be named from information in
> each entry.
>
> (" e.g. c:\3000\'autonumber' 'name' ")[/color]

One method is:

Set fs = CreateObject("Scripting.FileSystemObject")
fs.CreateFolder "C:\3000\" & FileID & FileDesc
fs.close
[color=blue]
> also if anyone knows how to take a standard word or excel file, like
> say for a fax cover sheet, and automatically copy it into a directory.[/color]


FileID = 3000
FileDesc = "Name"
FileCopy "c:\docs\mydoc.doc", "c:\3000\" & FileID & FileDesc & "\mydoc.doc"

or

Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile "c:\docs\mydoc.doc", "c:\3000\" & FileID & FileDesc &
"\mydoc.doc"
fs.close
--
regards,

Br@dley


tkal2k@gmail.com
Guest
 
Posts: n/a
#3: Feb 15 '06

re: Creating Directories


thanks so much! i am able to create the directory and put the file in
that created directory, however the directory name is whatever i put
input the FileID and FileDesc.

FileID= "bids"
FileDesc= "name"

....\bids name

instead of taking the data from "bids" and "name" and using those to
name the directory.

please help, i appreciate it!

Thanks again Br@dley

-Tony

tkal2k@gmail.com
Guest
 
Posts: n/a
#4: Feb 15 '06

re: Creating Directories


nm. i figured it out. thanks!

Closed Thread