By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,663 Members | 1,827 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,663 IT Pros & Developers. It's quick & easy.

Creating Directories

P: n/a
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

Feb 14 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Br
tk****@gmail.com wrote:
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' ")
One method is:

Set fs = CreateObject("Scripting.FileSystemObject")
fs.CreateFolder "C:\3000\" & FileID & FileDesc
fs.close
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.

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
Feb 15 '06 #2

P: n/a
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

Feb 15 '06 #3

P: n/a
nm. i figured it out. thanks!

Feb 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.