FAQ Database Discussion Community


PHP - On Form Submit duplicate folder with new name

php,apache,permissions,folders
Is it possible that php can create a new directory with certain files inside. For example when the php code is activated it duplicates a folder in my server directory with it's own name? I would very much appreciate if anyone could provide the start of the code I would...

Why is my source folder and destination folder merging names? I want source folder inside my destination

vbscript,folders,copying,file-copying
Dim WshNetwork,objNetwork, WshShell, objFSO, objItem Set objNetwork = CreateObject("Wscript.Network") Set WshNetwork = WScript.CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") Set WSHShell = CreateObject("WScript.Shell") If not objFSO.FolderExists("C:\Backups") Then objFSO.CreateFolder "C:\Backups" Else End If If not objFSO.FolderExists("C:\Backups\" & strUserName) Then objFSO.CreateFolder ("C:\Backups\" & strUserName) Else End If Set FSO = CreateObject("Scripting.FileSystemObject") strUserName =...

Delete unused files and folders in an existing project

javascript,php,file,filesystems,folders
I recently started working on this php project that had some previous developers. These dev's made a bit of a mess of things, resulting in a huge amount of different files, in PHP as well as javascript files and stylesheets. I'd like to reduce the amount of files and folders,...

Can't access other folders/directories with my XML program

xml,directory,location,folders,pathing
So right now I'm trying to access a certain file automatically through the browse function on my computer. This is what I have so far, but it only keeps me within the same folder as my file is in. How would I access another folder with this: <SupportedDevices> <Device VID="0x1234"...

.BAT file to move files into folders and subfolders by filename… can't get subfolders to work

batch-file,cmd,folders
I just can't figure this out. I have a bunch of files with name format: "PREFIX_PREFIX2_filename.pdf" I want to sort them into folders like this: "PREFIX/PREFIX2/(files)" This is what I have so far: setlocal enableextensions disabledelayedexpansion for %%f in (*_*_*.pdf, *_*_*.png) do ( for /f "tokens=1, 2 delims=_" %%p in...

7zip files in all folders (Multiple archives )

file,batch-file,archive,folders,7zip
Does anyone know how to make 7zip recursively archive all files in a folder for all parent folders. Currently i have this: for /d %%X in (C:\Users\mikejoh\Desktop\Modst\Ziptest\*) do "c:\Program Files\7-Zip\7z.exe" a "%%X\*.7z" "%%X\win\*" But that only takes the Parent folders and zips them in the same location... i believe i...

Batch file that looks for a folder that contains 1 file

windows,file,batch-file,folders
i have a lot of folders with a random number of files within. And the most of them just have 1 file inside it, these files needs to move to the parent folder. but i don't know how i should do it with a batch file. I use Windows 7...

How to open a specific folder to list files within

list,vba,folders
I am new to VBA and am struggling to get an Excel sheet to do what i want, any help would be much appreciated. I am building an excel sheet that will import the file name and attributes of files in a specific folder. I have butchered several other examples...

Move files from multiple folders to multiple folders in Linux

bash,file,move,folders
How can I move files from multiple folders to another location. For example if I have 3 folders with name /test/folder1, /test/folder2, /test/folder3 and I want to move the contents of these folders into another location like /temp/folder1, /temp/folder2 /temp/folder3 using a script. I do not want to move these...

how to delete folder inside a folder using laravel 4

laravel-4,folders
Im new in laravel ..1st im create some folders. and display all the folders..then Im trying to delete folder. when im select a folder and I want click delete button that selected folder deleted from main folder and database. my controller.php code is here public function deletealbum($id) { $albums= ForumAlbum::find($id);...

Batch file to delete all folders in a directory except the newest folder

batch-file,backup,folders
I am trying to delete old backups in a specific folder after a new backup has been done. As i do not really have experience with DOS commands i mashed a couple of scripts i found on the internet into one: ::(C)2008 "BuckFix" www.winsupportforum.de @echo off setlocal set workdir="M:\BACKUPS\CACHE_SSD\" set...

Delphi - Use SHGetSpecialFolderPath to get My Download folder

windows,delphi,folders
I am using SHGetSpecialFolderPath to retrieve some Windows special folders with Delphi 7. Here is some code sample: const CSIDL_DESKTOP = $0000; CSIDL_PERSONAL = $0005; CSIDL_MYPICTURES = $0027; CSIDL_MYMUSIC = $000d; CSIDL_MYVIDEO = $000e; CSIDL_WINDOWS = $0024; CSIDL_SYSTEM = $0025; function GetSpecialFolderPath(Folder: Integer; ForceDir: Boolean): string; // Uses ShlObj var...

PHP Create Folder, Create Subfolder using #ID and Upload a default file?

php,hosting,folders,billing
Alright so I've had a bit of a go in my mind about this but I didn't really want to start without knowing how I was going to do it... I will be providing basic automatic hosting on my hosting account, where as the user will check the website, pay...

VBA Access: organize assorted records into KML folders

xml,vba,access-vba,kml,folders
I'm creating a program in Access that exports a table with coordinates into a view-able KML file. Currently the code I'm using starts at the beginning of the recordset and individually prints each record into a KML file. However I'm wanting to have the code organize the records into folders...

Batch creation of folders

python,folders,mkdir
I am trying to script a function in which it will creates a list of folders and sub-folders. While my code is as follows, I was wondering if there are any better methods for me to create the sub-folders? (See createFolders function line 5 onwards) Not that the naming of...

Shell Script to move photos into folders with date YYYYMMDD

shell,date,move,folders,bulk
I have an IP cam that sends a photo every minute to a folder on a PC (Linux) with (mv *20150501* 20150501). Where the camera sends following filename: Schedule_20150501-103642.jpg I would like to make a shell script that: Lookup in the file name for date in format YYYYMMDD and if...

Iterate through the folder and find a particular file

vbscript,folders,subfolder
I have written this code to iterate through the folders and exit the function when it finds the ".c" file. Ideally it should return the path of the ".c" file. But its returning empty string. tval = 1 Function findStlcode(objFSO,fFolder,folderName) Set objFSO = CreateObject("Scripting.FileSystemObject") Set Folder = objFSO.GetFolder(fFolder) Set colfiles...

PowerShell to get Folder Owner 3 Folders Deep

powershell,permissions,acl,powershell-v3.0,folders
I need to get a list of all the folders owners on a shared network drive. However, I want to limit the recursion to just 3 folders deep (some of our users will create folders several levels deep, despite us telling them not to). I've found the below script, and...