Start a new topic

rename a file to include user_name

dtexley@trilliumchp.com @ Thu May 22 17:15:27 EEST 2014
Is there a way to include the user's name as part of the filename when performing a rename task?

I tried {stem}.%user_name%.{ext} but nothing happens I'm thinking that the %% variables are only available in email subject and body?

spinkb @ Thu May 22 18:18:12 EEST 2014
Keep things consistent. Use just the curly brackets around variables.

{user_name} is OK to use.

Thanks,
Ben
dtexley@trilliumchp.com @ Wed Jun 04 10:10:59 EEST 2014
I've set the new name to {stem}.{user_name}{ext} but the files are not renamed when the user uploads files. I have the CrushTask set to run when the user disconnects and the site log shows that the Task is called, but no error message is generated that I can see.

How can I get more information on the reason for the failure?

Thanks.
spinkb @ Wed Jun 04 10:14:10 EEST 2014
How is the entire task configured exactly?
dtexley@trilliumchp.com @ Wed Jun 04 10:36:32 EEST 2014
Here the CrushTask and the user acct configurations. It's not renaming the file though I do see the task being called in the logs.

---------------------
Plugin : CrushTask
Name: Rename & Notify
Enabled
Task 1 - Rename : Rename
Task 2 - Email : Email

Rename : Rename

Source Filter : *
New Name: {stem}.{user_name}{ext}
Keep trying for x seconds : 10
x Skip sub items if parent is renamed

Email : Email

From: CrushProd@[ourserver].com
To: TechTeam@[ourserver].com
Subject: File(s) uploaded by %user_name%
Body:
Files have been uploaded by %user_name%

%web_upload_form%
%user_time% %the_file_path%%the_file_name% Total Size:%the_file_size_formatted% @ %the_file_speed% k/sec
Please process these as soon as possible!

-----------------------------
In the User Acct under Events:

Event Name : Rename and Notify.
Action: Run Plugin
When this user: Uploads
x Always do the event
x Do event after user: Disconnects all sessions

Task: CrushTask:Rename & Notify
spinkb @ Wed Jun 04 10:42:10 EEST 2014
What exact CrushFTP version is this?

And what exactly is logged in t eh CrushFTP.log?

Thanks,
Ben
dtexley@trilliumchp.com @ Wed Jun 04 11:01:11 EEST 2014
06/03/2014 08:08:33 AM|[SFTP:40517::xx.xx.70.54] WROTE: *226 Transfer complete. MD5=e8b8ee838610227f9822945ef7e62dd6 ("/Inbound/MB000720_5010_837D_0603_001.txt" 135197) STOR*
06/03/2014 08:08:33 AM|[40517::xx.xx.70.54] WROTE: *Adding MB000720_5010_837D_0603_001.txt to event tracking.*
06/03/2014 08:08:33 AM|[40517::xx.xx.70.54] WROTE: *Tracking event items (...SFTP) uploads:2,downloads:0,deletes:0,renames:0,lastType:UPLOAD*
06/03/2014 08:08:33 AM|There is now 1 active connection
06/03/2014 08:08:33 AM|There are now 0 active connections
06/03/2014 08:08:43 AM|Grouping event on id:default
06/03/2014 08:08:43 AM|Event:PLUGIN Rename and Notify
06/03/2014 08:08:43 AM|Event:PLUGIN Rename and Notify:CrushTask:Rename & Notify:
06/03/2014 08:10:25 AM|:127.0.0.1
06/03/2014 08:10:25 AM|There is now 1 active connections
06/03/2014 08:10:25 AM|:127.0.0.1

spinkb @ Wed Jun 04 11:16:28 EEST 2014
Enable the debug checkbox on the event, or task so we can see more about what the event did.

Screenshots would help too.

Thanks,
Ben
dtexley@trilliumchp.com @ Wed Jun 04 11:33:21 EEST 2014
I've enabled the debug, but I'll have to add the task to our test acct as these users only send files once a month (of course). Screenshots are problematical as I can't access any of the image hosting svcs from inside our corporate network....
spinkb @ Wed Jun 04 11:40:23 EEST 2014
Email us directly at support then and send as attachments.
dtexley@trilliumchp.com @ Thu Jun 05 11:45:01 EEST 2014
sorry for the delay, i'm caught up in another project for a day or two.
dtexley@trilliumchp.com @ Mon Jun 09 10:54:37 EEST 2014
having debug enabled did not add any information in the log. I've emailed the screen shots and log excerpt
Solyom84 @ Mon Jun 09 11:16:06 EEST 2014
The log you have sent does barely contain any useful information, and it's to short.

You should try and set your rename task as {stem}_{user_name}{ext} and try like that and let us know, if the issue persists email us a bigger log snippet.

Thanks,
Arpad.
dtexley@trilliumchp.com @ Mon Jun 09 11:22:58 EEST 2014
I made the change you requested. I was able to get a clean log sequence from login to the call for the task (ie none of the production users hit the server in the mean time).

Still no joy, the rename doesn't take place, no error message generated. I have other tasks that execute fine so I'm mystified as to why this one (actually much simpler than others) just won't work.

Thanks for your help.

[code]
06/09/2014 09:18:12 AM|[HTTPS:41958:172.16.4.147:443] Accepting connection from: 172.16.4.250:53889
06/09/2014 09:18:13 AM|:127.0.0.1
06/09/2014 09:18:13 AM|There are now 2 active connections
06/09/2014 09:18:13 AM|:127.0.0.1
06/09/2014 09:18:13 AM|:127.0.0.1
06/09/2014 09:18:13 AM|There are now 3 active connections
06/09/2014 09:18:13 AM|:127.0.0.1
06/09/2014 09:18:13 AM|Client is attempting none authentication
06/09/2014 09:18:13 AM|Client is attempting keyboard-interactive authentication
06/09/2014 09:18:13 AM|[SFTP:172.16.4.147:22][41959] Accepting connection from: 172.16.5.142:53893
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *Verifying password for TempAccount.*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *USER TempAccount*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *PASS *
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *CONNECT TempAccount*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *getFileAttributes /*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *getFileAttributes /*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *CWD /*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] WROTE: *250 "/" CWD command successful.*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *LIST /*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *getFileAttributes /Outbound*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *fileExists /Outbound*
06/09/2014 09:18:13 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *getFileAttributes /Outbound*
06/09/2014 09:18:16 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *getFileAttributes /Inbound*
06/09/2014 09:18:16 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *CWD /Inbound/*
06/09/2014 09:18:16 AM|[SFTP:41959:TempAccount:172.16.5.142] WROTE: *250 "/Inbound/" CWD command successful.*
06/09/2014 09:18:16 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *getFileAttributes /Inbound/*
06/09/2014 09:18:16 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *CWD /Inbound/*
06/09/2014 09:18:16 AM|[SFTP:41959:TempAccount:172.16.5.142] WROTE: *250 "/Inbound/" CWD command successful.*
06/09/2014 09:18:16 AM|[SFTP:41959:TempAccount:172.16.5.142] READ: *LIST /Inbound/*
06/09/2014 09:18:25 AM|:127.0.0.1
06/09/2014 09:18:25 AM|There are now 4 active connections
06/09/2014 09:18:25 AM|:127.0.0.1
06/09/2014 09:18:25 AM|:127.0.0.1
06/09/2014 09:18:25 AM|There are now 5 active connections
06/09/2014 09:18:25 AM|:127.0.0.1
06/09/2014 09:18:25 AM|Client is attempting none authentication
06/09/2014 09:18:25 AM|Client is attempting keyboard-interactive authentication
06/09/2014 09:18:25 AM|[SFTP:172.16.4.147:22][41960] Accepting connection from: 172.16.5.142:53899
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *Verifying password for TempAccount.*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *USER TempAccount*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *PASS *
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *CONNECT TempAccount*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *getFileAttributes /*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *getFileAttributes /Inbound*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *CWD /Inbound/*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] WROTE: *250 "/Inbound/" CWD command successful.*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *getFileAttributes /Inbound/ExhibitO_Trill_CCOG_20140414 .csv*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *getFileAttributes /Inbound*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *fileExists /Inbound/ExhibitO_Trill_CCOG_20140414 .csv*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *STOR START /Inbound/ExhibitO_Trill_CCOG_20140414 .csv*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *STOR START /Inbound/ExhibitO_Trill_CCOG_20140414 .csv:ugxl8*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *STOR /Inbound/ExhibitO_Trill_CCOG_20140414 .csv:ugxl8*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] WROTE: *150 Opening BINARY mode data connection. Ready to write file /Inbound/ExhibitO_Trill_CCOG_20140414 .csv. "/Inbound/ExhibitO_Trill_CCOG_20140414 .csv") S T O R*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *STOR END /Inbound/ExhibitO_Trill_CCOG_20140414 .csv:ugxl8*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] WROTE: *226-Upload File Size:1455 bytes @ 1K/sec. MD5=97030cab421d941997397530792b4b8f*
06/09/2014 09:18:25 AM|[SFTP:41960:TempAccount:172.16.5.142] WROTE: *226 Transfer complete. MD5=97030cab421d941997397530792b4b8f ("/Inbound/ExhibitO_Trill_CCOG_20140414 .csv" 1455) STOR*
06/09/2014 09:18:25 AM|[41960:TempAccount:172.16.5.142] WROTE: *Adding ExhibitO_Trill_CCOG_20140414 .csv to event tracking.*
06/09/2014 09:18:25 AM|[41960:TempAccount:172.16.5.142] WROTE: *Tracking event items (...SFTP) uploads:1,downloads:0,deletes:0,renames:0,lastType:UPLOAD*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *getFileAttributes /Inbound/ExhibitO_Trill_CCOG_20140414 .csv*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *fileExists /Inbound/ExhibitO_Trill_CCOG_20140414 .csv*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *getFileAttributes /Inbound/ExhibitO_Trill_CCOG_20140414 .csv*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *MDTM /Inbound/ExhibitO_Trill_CCOG_20140414 .csv 1397507736000*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *STOR START /Inbound/ExhibitO_Trill_CCOG_20140414 .csv*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *getFileAttributes /Inbound/*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *CWD /Inbound/*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] WROTE: *250 "/Inbound/" CWD command successful.*
06/09/2014 09:18:26 AM|[SFTP:41960:TempAccount:172.16.5.142] READ: *LIST /Inbound/*
06/09/2014 09:18:37 AM|There are now 4 active connections
06/09/2014 09:18:37 AM|There are now 3 active connections
06/09/2014 09:18:37 AM|There are now 2 active connections
06/09/2014 09:18:37 AM|There is now 1 active connection
06/09/2014 09:18:38 AM|Grouping event on id:default
06/09/2014 09:18:38 AM|Event:PLUGIN Rename and Notify
06/09/2014 09:18:38 AM|Event:PLUGIN Rename and Notify:CrushTask:Rename & Notify:
[/code]
spinkb @ Mon Jun 09 12:49:01 EEST 2014
When this task runs, CrushFTP v7 makes a new log in the logs folder, jobs folder. It will appear right when the task is run.
The log shows the task was run...so what shows up in that log file? You likely still have one for around the time "06/09/2014 09:18:38".
Let me know,
Ben
Login to post a comment