Problems with FileSave

I’m getting mixed results with Filesave. In Panorama 6 this worked, no problem (importorders is a variable):

FileSave homesubfolder(“Desktop”) ,“Orders”+datepattern(today(),“mm/dd/yy”)+{"@"}+timepattern(now(),“hh;mm am/pm”),"",importorders

In Panorama X, the same code results in an error that file “54 pm” doesn’t exist.

The following saves a file called “Orders030708”@"

FileSave homesubfolder(“Desktop”),“Orders”+datepattern(today(),“MMDDYY)+{”@"},"", import orders

The following saves a file called “Ordersmmddyy”@"

FileSave homesubfolder(“Desktop”),“Orders”+datepattern(today(),“mmddyy”)+{"@"},"", import orders

However, the following produces the error, the file"18"@"" doesn’t exist. :

FileSave homesubfolder(“Desktop”) ,“Orders”+datepattern(today(),“mm/dd/yy”)+{"@"},"", import orders

I can’t see any consistency with the results. Is there a known bug with FileSave in Panorama X? Is there a limit to the characters it can save?

Thanks for any feedback.

The slashes are being interpreted as folder separators. Try colons instead. They should appear as slashes in the Finder.

Forget the colons. They apparently get converted to slashes, and you wind up with the same error.

UNIX doesn’t allow slashes in file names. Pick some other character, like an underscore or dash. (But avoid colons, they also have special significance.)

The original post also illustrates an aspect of the datepattern function regarding the pattern case I wasn’t aware of:

datepattern(today(),"MMDDYY") --> 030818

but

datepattern(today(),"mmddyy") --> mmddyy

Delimiting the lower case pattern does give the intended output, including no leading zeros:

datepattern(today(),"mm-dd-yy") --> 3-8-18

This was a resolved issue, that apparently never made it into the documentation. Panorama X does require delimiters between components, but there are a few components that include month day and year, all in one.

1 Like

Bummer, but thanks for the heads up.

The bitbucket post seems to be the opposite of what I’m experiencing.

There are two things to remember here. The Bitbucket issue was not about file and folder paths, and it was resolved. There are six patterns that do work, that did not before.

Unlike Panorama 6, Panorama X doesn’t allow date pattern components to be placed next to each other with no separator. This is still true, but I have added six new “components” for common date patterns – DDMMYY, MMDDYY, YYMMDD, DDMMYYYY, MMDDYYYY and YYYYMMDD.