Our main flow builds the archive hierarchy from the rep name/reference and the filename in the XML from iDropper.
This works fine 99.5% of the time. However, in their infinite wisdom, customers sometimes use illegal, non-dos characters in their filename.
This plays havoc with the new directory structure.
Does anyone have any thoughts on how I can build the "Archive hierarchy" but filter the 'dodgy characters'...?
Filter illegal characters
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Filter illegal characters
Clive, couldn't you scan the filenames as String from the XML file and remove "illegal" character before creating the directories?
Dwight Kelly
Apago, Inc.
dkelly@apago.com
Dwight Kelly
Apago, Inc.
dkelly@apago.com
Filter illegal characters
Clive,
I rename the files before using it with a regexp like this:
replace(/[^a-zA-Z0-9_]/g,"")
Benoit
I rename the files before using it with a regexp like this:
replace(/[^a-zA-Z0-9_]/g,"")
Benoit
-
- Member
- Posts: 85
- Joined: Thu Jun 23, 2011 11:41 am
Filter illegal characters
Benoit wrote: Clive,
I rename the files before using it with a regexp like this:
replace(/[^a-zA-Z0-9_]/g,"")
Benoit
Trouble is, I need to either catch it at the iDropper upload (where it builds the file list in XML) - or I need to edit the xml file list to match the renamed files...
Hmmm.....
I rename the files before using it with a regexp like this:
replace(/[^a-zA-Z0-9_]/g,"")
Benoit
Trouble is, I need to either catch it at the iDropper upload (where it builds the file list in XML) - or I need to edit the xml file list to match the renamed files...
Hmmm.....