View Single Post
Old 25 February 2013, 00:41   #3
pintcat
Registered User
 
Join Date: Mar 2008
Location: Berlin/Germany
Posts: 215
Using LIST to create and append a list of files to the TAR command line is a good idea. I played around a little with different LIST options and it worked well for files and folders.
Now I'm trying to write a script which enables you to put a list of file and folder names (with or without place holders) and then calls TAR to archive all given files. Using LIST here in a script for file name dumping is a bit tricky, because if the given name is a folder and no place holder is used, it puts the whole content of the folder instead of the folder name itself. Example:
Assuming there is a folder called "DirName",
Code:
LIST QUICK NOHEAD DirName#?
...would simply put "DirName" as result. On the other hand...
Code:
LIST QUICK NOHEAD DirName
...would of course put DirName's content which, if appended to the TAR command line, would cause lots of "file not found" errors. I honestly doubt that there's a way to force LIST to put a folder's name rather than it's content.
pintcat is offline  
 
Page generated in 0.04571 seconds with 11 queries