Talk About Network

Google





Programming > Basic General > folder accessin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 679 of 704
Post > Topic >>

folder accessing and file renamimg problems (QB45)

by stumped <me@[EMAIL PROTECTED] > Aug 2, 2008 at 02:58 PM

I am meeting seemingly insurmountable opposition from QuickBasic 4.5
(Win98SE)
in two specific tasks within a large program.

1.	Accessing folders, and moving between them ...

There are eight folders below a first level folder on a  drive, let's call
them
E:\2BAS\A through E:\2BAS\H.  These folders had names of people ("Bob
Blue") or
organisations ("Northern Star").  Each had a file with a common name
("Target.xxx") which I needed to access, extract some internal
information, and
then rename.

QB didn't like "Bob Blue" as a folder name, error 76 "Path not found" so I
replaced the space with an underscore in each folder name.  The path
E:\2BAS\Bob_Blue was now acceptable.

Then came the problem of  the foldername exceeding 8 chars.  Bob_Blue was
fine
but Bob_Brown and the other six foldernames which were >8 chars weren't,
so
within the program that became Bob_Br~1 and QB was again kept happy, ...
except that Northe~1 kept giving an error 76.  Typos have been excluded as
a
cause.  I haven't yet tried changing the foldername completely, but all
the
other names such as John_C~1 work fine.  It seems that this particular
name is
the problem.

2.	Renaming the target file ....

The file/path string for reading the target file is valid and the
reading/extraction process works fine.  But executing a command:

	NAME "E:\2BAS\Bob_Br~1\Target" as "E:\2BAS\Bob_Br~1\NewName"

gives an error 64 "Bad file name".  I am presuming this comes about
because
NewName$ contains "...\Bob_Br~1\ ..." but I'm far from 100% on that.

Is there a way - elegant or otherwise - to actually issue the equivalent
of a
PATH statement so that the rename command is cleaned up and becomes

	NAME "Target.xxx" as "NewName.xxx"

?

Any constructive suggestions how to cir***vent these problems would be
appreciated.
 




 7 Posts in Topic:
folder accessing and file renamimg problems (QB45)
stumped <me@[EMAIL PRO  2008-08-02 14:58:31 
Re: folder accessing and file renamimg problems (QB45)
Wilko <wilko@[EMAIL PR  2008-08-02 10:19:21 
Re: folder accessing and file renamimg problems (QB45)
"Tom Lake" <  2008-08-02 08:28:14 
Re: folder accessing and file renamimg problems (QB45)
Derek <derekrss@[EMAIL  2008-08-02 19:08:35 
Re: folder accessing and file renamimg problems (QB45)
Derek <derekrss@[EMAIL  2008-08-07 15:13:13 
Re: folder accessing and file renamimg problems (QB45)
Derek <derekrss@[EMAIL  2008-08-07 15:15:08 
Re: folder accessing and file renamimg problems (QB45)
stumped <me@[EMAIL PRO  2008-08-08 13:36:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 10:59:26 PST 2009.