[AccessD] OT: Create .bat in WinXP Pro

Hale, Jim Jim.Hale at FleetPride.com
Tue May 3 08:38:58 CDT 2005


If you are running part of the process in Access why not rename the file in
code as well? Something like this code snippet I use to rename files in one
of my programs.
Jim Hale

strFilename = GetNamePart_TSB(strpath2) 'get old file name
    'create new filename
    strFileSave = ReplaceString(strpath2, ".txt", ".dmp", False)
    strFilename = GetNamePart_TSB(strFileSave) 'get name of new file   
    strDir(2) = Pathnamefile("CLPdata") 'get directory to move to
    strPathnew = strDir(2) & strFilename 'path where file will be move to

    Name strpath2 As strFileSave 'rename file

    If FileExists(strPathnew) = True Then Kill strPathnew
    Name strFileSave As strPathnew 'move renamed text file to new sub dir

-----Original Message-----
From: Penn 227 [mailto:penn227 at yahoo.com]
Sent: Monday, May 02, 2005 7:43 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] OT: Create .bat in WinXP Pro


Jim,

I'm sorry but I don't understand your comment.
This is running entirely outside of Access.  The
reason it's related to Access is that my error
handler checks to see if that file is present under
the name of DevFile.txt.  If it isn't present thne
the user is prompted to print the error message
and it is written to a log file.  If it is present,
then
a msgbox offers to debug the code.  It's a tip I
got from reading Access Security Ideas from
an Experienced Developer 
(http://www.vb123.com/toolshed/05_access/accesssprotectionideas.htm).

I've found it to be an excellent error handler
since all the others I've seen don't give you a
clue about where the runtime error actually occurred.

Penn



----- Original Message ----- 
From: "Hale, Jim" <Jim.Hale at fleetpride.com>
To: "'Access Developers discussion and problem
solving'" 
<accessd at databaseadvisors.com>
Sent: Monday, May 02, 2005 5:28 PM
Subject: RE: [AccessD] OT: Create .bat in WinXP Pro


> After I create the desired string I use
> Name strpath2 As strFileSave 'rename file
>
> Jim Hale
>
> -----Original Message-----
> From: Penn 227 [mailto:penn227 at yahoo.com]
> Sent: Monday, May 02, 2005 4:10 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] OT: Create .bat in WinXP Pro
>
>
> This is completely off topic but I can't find
> any answers on the web and thought perhaps
> someone on the list had experience with it.
>
> I would like to automate renaming
> a file.
>
> I tried writing a batch file but
> it didn't work.
>
> ******* Batch File ******
> run cmd
> cd c:\
> ren DevFile.txt DevFileX.txt
> exit
> ***** End *****
>
> Any ideas greatly appreciated.
>
> Penn
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
protection around
> http://mail.yahoo.com
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
***********************************************************************
> The information transmitted is intended solely for
the individual or
> entity to which it is addressed and may contain
confidential and/or
> privileged material. Any review, retransmission,
dissemination or
> other use of or taking action in reliance upon this
information by
> persons or entities other than the intended
recipient is prohibited.
> If you have received this email in error please
contact the sender and
> delete the material from any computer. As a
recipient of this email,
> you are responsible for screening its contents and
the contents of any
> attachments for the presence of viruses. No
liability is accepted for
> any damages caused by any virus transmitted by this
email.



> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.


More information about the AccessD mailing list