Folder Action Rules & Filename with blank spaces

To the Ipswitch web site

Ipswitch Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Folder Action Rules & Filename with blank spacesExpand / Collapse
Author
Message
Posted 9/18/2008 4:12:27 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/22/2008 9:34:57 AM
Posts: 4, Visits: 10
Hi,

I create a folder action rule on upload. In the executable line, I put this:

Executable :    C:\Windows\System32\CMD.EXE
Arguments :    
/c "%programfiles%\PGP Corporation\PGP Command Line\PGPEncrypt.bat" %User %File

In the script, I use the following line to encrypt with PGP:

pgp -es %2 -r 0xA1B2C3D --output Z:\%1 passphrase "passphrase"

where %2 is %File and %1 is %User

All work very well while the filename transfered don't have any blank space in it's name.

The nightmare happens when there's a blank space in the transfered filename ...

The variable %1 receive the first word of the filename and the variable %2 receive the second word of the filename, creating a folder named by the second word of the transfered filename in Z:\; and there's nothing encrypted and/or transfered in it... I also try with the argument %SimpleName, but with it the script don't work.

I also try to put quotes between %File, like this :

Arguments :     /c "%programfiles%\PGP Corporation\PGP Command Line\PGPEncrypt.bat" %User "%File"

But doing this, my script don't execute at all ...

This bug is from my script or from WSFTP ?

Thank for help.

Dany N.

Post #47119
Posted 9/19/2008 1:48:25 PM


Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Ipswitch Employees
Last Login: 2 days ago @ 6:00:57 PM
Posts: 44, Visits: 92
Hi,

Have you tried this as a test?

Take your arguments line from the WS_FTP Server rule:

"%programfiles%\PGP Corporation\PGP Command Line\PGPEncrypt.bat" %File %User

Plug in the variables manually for a file and user that actually exists and run it that way.

This pulls WS_FTP Server out of the picture completely and you are only dealing with the Windows command line and your PGP program.

ALan

Here I am....

Post #47146
Posted 9/19/2008 2:14:29 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/22/2008 9:34:57 AM
Posts: 4, Visits: 10
Hi,

The problem, I want the file encrypted every time a file is uploaded ... if I put WSFTP out, I will be forced to use some kind of Scheduled task ... and I don't want to ... maybe I will face up to thousand of file ...

All work very well if there isn't any space in the file name ...

Thank for help

Dany N.

Post #47147
Posted 9/22/2008 9:37:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/22/2008 9:34:57 AM
Posts: 4, Visits: 10
HI,

I just try to use a user name with a space in it ... and I have the same problem ... is WSFTP isn't eable to handle blank space within folder rules arguments ??

Thank you.

Dany N.

Post #47176
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Dave, Mark Singh, kevin r gillis, Jason Benton, Brandon Felger, Ben Henderson, Tripp Allen, Will Sansbury, Jason Williams, Hush, FTPplanet.com, LDW, Hugh Garber, WUP-PM, mmulryan@ipswitch.com, mswimm, Travis G.

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 4:27pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.031. 9 queries. Compression Enabled.