hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File rename appending

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Variables and Regular Expressions
View previous topic :: View next topic  
Author Message
chrisr



Joined: 24 Oct 2008
Posts: 5

PostPosted: Fri Oct 24, 2008 1:07 pm    Post subject: File rename appending Reply with quote

I am trying to rename a file while transfering in SFTP. I have entered only the file name:

daily_recon

However the file is being renamed:

daily_recon2008-10-24-06-56-16.txt

I would like it to be named:

daily_recon.txt

I have not selected to append the filename.

Second issue:

Can I have it rename the a backup with a different filename that does add the date stamp?

I am sure this is basic, please help.
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Oct 24, 2008 2:06 pm    Post subject: Reply with quote

In the append field, enter: .txt

The backup gets the same filename as the transferred file. There is no option for this.

Your only option is to use a copy task (for local backup) and append filename. For remote you would have to transfer again with date appended.
Back to top
View user's profile Send private message
chrisr



Joined: 24 Oct 2008
Posts: 5

PostPosted: Fri Oct 24, 2008 3:48 pm    Post subject: Reply with quote

Thank you for the suggestion on backup name. Smile

I tried putting .txt in the append field and it is still putting the date infront of the .txt

Do I need to formate the file name with any qualifiers? I have only typed in the desired name.

Chris
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 595
Location: Santa Barbara, california

PostPosted: Sat Oct 25, 2008 8:17 am    Post subject: Reply with quote

which version are you using? 8.05 etc?
which task type is this , SFTP or SFTP-j?
Back to top
View user's profile Send private message Send e-mail
chrisr



Joined: 24 Oct 2008
Posts: 5

PostPosted: Sun Oct 26, 2008 5:55 am    Post subject: Reply with quote

Version is: JaSFtp 8.00

Task type is: SFTP
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Mon Oct 27, 2008 3:49 pm    Post subject: Reply with quote

We could not reproduce this on the 8.09 SFTP Task.

Try updating to 8.09 and see if the problem goes away.
Back to top
View user's profile Send private message
chrisr



Joined: 24 Oct 2008
Posts: 5

PostPosted: Thu Oct 30, 2008 6:48 am    Post subject: Reply with quote

Upgrade to 8.09 did not stop the issue. I think may have the task set up to create the filename I am getting. Please take a look.

I have the program set to pull down files with the following naming structure:

Financial - Daily Recon File_2008-10-09-03-14-24.txt

The date changes with every file.

I set in the "Filename" field to pick up all files with the following variable:

Financial - Daily Recon File*

Then to "Rename Filename":

Daily Recon File

In the Append to filename I have selected the default:

"Do Not Append:

What I am getting is the file renamed to:

Daily Recon File_2008-10-30-03-14-03

Any Suggestions?
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Thu Oct 30, 2008 3:19 pm    Post subject: Reply with quote

The rename is automatically done using REGEX where * is a meta character which means 1 or more characters.

Try for the filename:
Financial - Daily Recon File.*

rename filename:
Daily Recon File

. matches any character
* matches 1 or more of what is to its left
so:
*. matches 1 or more of any character
Back to top
View user's profile Send private message
chrisr



Joined: 24 Oct 2008
Posts: 5

PostPosted: Tue Nov 18, 2008 12:16 pm    Post subject: Reply with quote

I tried the suggestion and it failed to pick up the file.

I did discover what I think the program is doing:

I have modified the file name to:

Financial - Daily Recon File

so that it will pick up all files with the filename of:

Financial - Daily Recon File_2008-10-09-03-14-24.txt (the variable time/ date stamp)and this is working.

and the rename is set to:

Daily Recon File

With "do not append" selected

What the program is doing is taking the filename past my entered varable and appending it to the end of my new rename entry.

giving me the new file name:

Daily Recon File_2008-10-09-03-14-24.txt

Do you know anyway to get it to stop adding the remaining original filename to the new file rename entry?

Thanks!
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 595
Location: Santa Barbara, california

PostPosted: Wed Nov 19, 2008 9:09 pm    Post subject: Reply with quote

I had no problem doing this:
2008-11-19 21:06:15 Source = C:\temp\Financial - Daily Recon File_2008-10-09-03-14-24.txt, Date = Aug 2, 2007 5:47:55 PM

2008-11-19 21:06:15 File copied to: C:\test\Daily Recon File


used:
File name:
Financial - Daily Recon File

rename field:
Financial - Daily Recon File.*<REPLACE>Daily Recon File
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Variables and Regular Expressions All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group