Excluding Sub Directories from a PUT script
Good afternoon,
Thanks for all the wonderful info already in this forum. I am new to scripting and have found it to be a wealth of knowledge. I have been banging my head to get this simple script working, pretty sure I am not using the syntax correct. I would like to capture all text files 1 day or less in age beginning with EDI in a local directory and upload them to a remote directory. The issue is I can get the put command to ignore all sub directories of the local source and I don't have create privileges on the remote FTP. Here is what I have working fine for a similar directory that does not have any sub directories. This is the working script for the folder without sub directories (I am capturing .dat files in this one
put -nopermissions -nopreservetime -filemask="EDI*.dat>=1D" \\LOCAL_DIRECTORY /REMOTE_DIRECTORY
I have tried the following for the folder whose sub-directories need to be ignored
put -nopermissions -nopreservetime -filemask="EDI*.txt>=1D| */" \\LOCAL_DIRECTORY /REMOTE_DIRECTORY
put -nopermissions -nopreservetime -filemask=""EDI*.txt>=1D| */"" \\LOCAL_DIRECTORY /REMOTE_DIRECTORY
Thanks
Scott
Thanks for all the wonderful info already in this forum. I am new to scripting and have found it to be a wealth of knowledge. I have been banging my head to get this simple script working, pretty sure I am not using the syntax correct. I would like to capture all text files 1 day or less in age beginning with EDI in a local directory and upload them to a remote directory. The issue is I can get the put command to ignore all sub directories of the local source and I don't have create privileges on the remote FTP. Here is what I have working fine for a similar directory that does not have any sub directories. This is the working script for the folder without sub directories (I am capturing .dat files in this one
put -nopermissions -nopreservetime -filemask="EDI*.dat>=1D" \\LOCAL_DIRECTORY /REMOTE_DIRECTORY
I have tried the following for the folder whose sub-directories need to be ignored
put -nopermissions -nopreservetime -filemask="EDI*.txt>=1D| */" \\LOCAL_DIRECTORY /REMOTE_DIRECTORY
put -nopermissions -nopreservetime -filemask=""EDI*.txt>=1D| */"" \\LOCAL_DIRECTORY /REMOTE_DIRECTORY
Thanks
Scott