|
I am creating a script on the fly to ftp some files from a remote computer. I create a file which is then called from the command line with
ftp -s:filename proxy
where filename is the file I just created. The file has code similar to the following:
anonymous...
Started by thursdaysgeek on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Are you looking for LCD and CD where LCD changes directory on the local machine? EG:
LCD c:\destinationIn most ftp clients you can set the working directory on the server with the command cd , and you set the working directory ....
|
|
I have this bash script running my backup to an external hard drive... only if that drive is mounted (OS X):
DIR=/Volumes/External; if [ -e $DIR ]; then rsync -av ~/dir_to_backup $DIR; else echo "$DIR does not exist"; fi
This works, but I sense I am misreading...
Started by Marcus on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If this option is combined with the --ignore-existing /Volumes/External/;
It will exit with an error if the directory does not exist (which may or may.
directories) that do not exist yet on the destination.
|
|
I have Windows Server 2008 R2 installed and running. I created a full server backup to an external portable drive (MyBook by WD). It scheduled and has been running with no errors for a week. I purchased another MyBook (same size too) to swap out so we...
Started by TheCodeMonk on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at serverfault):
That is, I needed to start from scratch with all five .
Thanks!
For anyone curious, on Windows 2008 R2 this problem than two drives using Adding a Destination.
Adding a Destination worked for me too.
|
Ask your Facebook Friends
|
So let's assume I have:
dest/dir/file1 dest/dir/file2 dest/dir/subdir/subfile1 dest/dir/subdir/subfile2
and
src/dir/file3 src/dir/subdir/subfile3 src/dir/newdir/anotherfile
... and let's assume there are thousands of files and subdirectories.
Now I want...
Started by Ilari Kajaste on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at superuser):
Exist on the destination: (cd src/dir ; find * -type d -print) | while read f; do [ ! -d "src/dir.
|
|
Hi,
I have directory called "mysourcedir" it has sonme files and folders. so i want to copy all content from this directory to some other "destinationfolder" on Linux server using PHP.
function full_copy( $source, $target ) { if ( is_dir( $source ) ) ...
Started by santosh on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
That takes care of preserving mod times.
Try running cp -a.
It again in the target directory.
|
|
Linux: I want a command (or probably an option to cp) that creates the destination directory if it does not exist.
Example:
cp -? file /path/to/copy/file/to/is/very/deep/there
Started by flybywire on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Shell function that does what you want, calling it a "bury" copy because it digs a hole for the file to live in:
bury_copy() { mkdir -p `dirname $2` && cp "$1" "$2"; } .
Test -d "$d" || mkdir -p "$d" && cp file "$d"
(there's no such option for cp ) .
|
|
Anyone know of a command line utility (or one that can run as a command line) that will collect all the .jpg files in a directory tree to a single folder, only copying files that change?
I started with Renamer , which is great for renaming files in their...
Started by Dr. Zim on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You need to have command extentions enabled from the destination directory if they have also been deleted from the source directory, and many other....
A is the source directory and B is the destination directory.
|
|
Is there a standard function to check that a specified directory is valid?
The reason I ask is that I am receiving an absolute directory string and filename from a user and I want to sanity check the location to check that it is valid.
Started by TK on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
It looks like(string)
For a Directory....
If it can't be a new directory, you can just check if it exists.
The Path components of a path.
The previous answer is correct with respect to checking whether a given file or directory exists.
|
|
Is it possible to use xcopy to copy files from several directories into one directory using only one xcopy command?
Assuming that I have the directory tree
root\Source\Sub1\Sub2
I want to copy all .xml files from the directory root\Source including sub...
Started by Oddleif on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
That worked fine - just not from msbuild.
Copy %f x:\destination\
By the way, when you use it from a batch file, you need to add spare:\destination\
when you use it within a batch
Thanks.
|
|
Hi,
I would like to create dynamically the destination of my uploaded files. But, it seems that the 'upload_to' option is only available for a models, not for forms. So the following code is wrong.
class MyForm(forms.Form):
fichier = forms.FileField(*...
Started by djibril on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Class YourFileModel.
With '/' then it is an absolute path, otherwise it is relative to your /media directory.
|