How do I export integer data with leading zeros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I include periods in my file names when using the TansferText macro?
My file name that I'm transfering looks something like this
TT30UDLK.PERM.FILE13.csv,
but when I look on the receving server, the file name appears like this
TT30UDLK#PERM#FILES13.csv. The two inner periods are replaced with "#". I
can't use a different file name because a process on the receiving server is
expecting the file name to be in a certain format. Any ideas? Thanks....
 
Hi Mark,

I have a nasty feeling that there's antique code in the export routine,
dating from the days when a filename couldn't include dots (apart from
the one between the name and the extension). The only work-round I can
think of is to export the file with a simple name and then rename it,
e.g (in VBA)

Name "D:\Folder\Simple.csv" As "D:\Folder\Long.Name.With.Periods.csv"

As far as I know there isn't a macro action for renaming files, but you
can use a little VBA function

Public Function RenameFile( _
OldName As String, _
NewName As String)

'OldName: path and name of file to rename or move
'NewName: path and name of destination
Name OldName As NewName
End Function

and call it with the RunCode macro action.
 
Back
Top