GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Easiest Way To Upload 1 File To 5000 Individual Directorys? (https://gfy.com/showthread.php?t=383776)

European Lee 11-05-2004 04:15 AM

Easiest Way To Upload 1 File To 5000 Individual Directorys?
 
Anyone happen to know the answer to this?

I dont feel like FTP'ing into each directory manually and uploading the file LOL

Regards,

Lee

Repetitive Monkey 11-05-2004 04:17 AM

Make a FTP script with a loop that goes through an array of FTP IPs/logins.

Jay_StandAhead 11-05-2004 04:29 AM

symlink

run a simple shell script that'll create symlinks to your file (so you save on HD space too)

would take 5 minutes for a good programmer to do

Jay_StandAhead 11-05-2004 04:30 AM

or whip out the good old ghost mouse!

Repetitive Monkey 11-05-2004 04:33 AM

Or ModRewrite if the paths and names are somewhat patterned.

kondro 11-05-2004 07:13 AM

You could do something this:

1. Upload file to temporary directory.

2. Use the following script:

find /base/dir -type d | xargs cp /tmp/dir/file

This will copy the file in the temporary directory to any directory under the /base/dir directory.

You could do a similar thing with symlink, just make sure not to delete the original and I would suggest using absolute paths.

European Lee 11-05-2004 07:16 AM

Quote:

Originally posted by kondro
You could do something this:

1. Upload file to temporary directory.

2. Use the following script:

find /base/dir -type d | xargs cp /tmp/dir/file

This will copy the file in the temporary directory to any directory under the /base/dir directory.

You could do a similar thing with symlink, just make sure not to delete the original and I would suggest using absolute paths.

Thats more along the lines of what i was looking for thanks :)

Out of interest though..

Will that copy the files into the sub directory of the initial sub directorys also?

domain.com/dir/subdir is where i need them to go not..

domain.com/dir/subdir/subdir

Regards,

Lee

cfU 11-05-2004 07:42 AM

<cfdirectory action="LIST"
name="fiveGFolderName"
directory="C:\Inetpub\wwwroot\folderOfFiveGs"
sort="name asc">

<cfif fiveGFolderName.recordcount>
<cfloop query="fiveGFolderName">
<cffile action="UPLOAD" fileField="yourFuckingFile"
destination = "C:\Inetpub\wwwroot\folderOfFiveGs\#fiveGFolderNam e.name#\"
nameconflict="MAKEUNIQUE" accept ="image/*,application/msword,text/*">
</cfloop>
</cfif>
:1orglaugh :1orglaugh :1orglaugh


All times are GMT -7. The time now is 10:17 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123