| View previous topic :: View next topic |
| Author |
Message |
chrisr
Joined: 24 Oct 2008 Posts: 5
|
Posted: Fri Oct 24, 2008 1:07 pm Post subject: File rename appending |
|
|
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 |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Fri Oct 24, 2008 2:06 pm Post subject: |
|
|
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 |
|
 |
chrisr
Joined: 24 Oct 2008 Posts: 5
|
Posted: Fri Oct 24, 2008 3:48 pm Post subject: |
|
|
Thank you for the suggestion on backup name.
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 |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 595 Location: Santa Barbara, california
|
Posted: Sat Oct 25, 2008 8:17 am Post subject: |
|
|
which version are you using? 8.05 etc?
which task type is this , SFTP or SFTP-j? |
|
| Back to top |
|
 |
chrisr
Joined: 24 Oct 2008 Posts: 5
|
Posted: Sun Oct 26, 2008 5:55 am Post subject: |
|
|
Version is: JaSFtp 8.00
Task type is: SFTP |
|
| Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Mon Oct 27, 2008 3:49 pm Post subject: |
|
|
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 |
|
 |
chrisr
Joined: 24 Oct 2008 Posts: 5
|
Posted: Thu Oct 30, 2008 6:48 am Post subject: |
|
|
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 |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Thu Oct 30, 2008 3:19 pm Post subject: |
|
|
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 |
|
 |
chrisr
Joined: 24 Oct 2008 Posts: 5
|
Posted: Tue Nov 18, 2008 12:16 pm Post subject: |
|
|
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 |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 595 Location: Santa Barbara, california
|
Posted: Wed Nov 19, 2008 9:09 pm Post subject: |
|
|
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 |
|
 |
|