how can the name of a folder and names of all the sub folders within that folder be fetched.
For example if we upload a file and as say
$file->getClientOriginalName();
and it gets the name of the file as it is stored in the device similarly
Is there any method which returns the full directory of the folder or the path of files stored within that folder?
Related
So I'm looking for a way for my shell to find the folder with the code behind the folder name that keeps changing, in the data/app/ folder, for example the folder "com.tencent.ig-yHGLSvh42dYO-GNMFS9WxA==". Which always changes only in the part after "com.tencent.ig-", the second "-" and "==". Full path "data/app/com.tencent.ig-yHGLSvh42dYO-GNMFS9WxA==/"
Code that can find the location of a folder so I can change the contents of that folder. If possible the code is contained in a variable so I can use it like so:
findfolder = (Code)
printf $findfolder
I have a folder that contains multiple subfolders, and each of those subfolders may contain their own subfolders, which may then contain their own subfolders, etc. and all of these folders may contain .txt files. I want to search all of the folders for files containing a certain phrase, then copy those files to a separate folder while maintaining their original folder structure. For example, I start with this:
original folder
subfolder 1
subfolder a
textfile1.txt
textfile2.txt
subfolder b
subfolder 2
textfile3.txt
subfolder 3
textfile2 and 3 contain the phrase. My destination folder ends up like this:
destination folder
original folder
subfolder 1
subfolder a
textfile2.txt
subfolder 2
textfile3.txt
How do I do this?
I need to do a bash script in order to copy all files which are in various subfolders and sub-subfolders of a main directory to a unique another folder while giving them a new name indicating their source.
Source paths and files are like:
MainDir/SubFolderX/SubSubFolderXY/fileZ.dat
MainDir/UnknowName../AnotherUnknowName../AnyFile.anyExtension
... Etc
Destination folder with renamed files would be:
NewDir/SubFolderX_SubSubFolderXY_fileZ.dat
NewDir/UnknowName.._AnotherUnknowName.._AnyFile.anyExtension
Etc
What I know is that there is only 2 levels but the names of the subfolders, the subsubfolders, the files, and their extensions could be anything.
I installed the DropIt product to copy PDF files from the selected folder and its subfolders.
I defined association :
rule: **;*.pdf which means any subfolder and just PDF files).
action: copy
destination folder : c:\mybackup\%SubDir%\
I drag and drop a selected folder and drop it into DropIt's icon.
Actually no file matches
Actually you can use only *.pdf and I assume it will already check all subfolder and process .pdf files.
After zipping the folder structure is like this
con-1.0-SNAPSHOT-Zipped inside this folder there is con-1.0-SNAPSHOT-Zipped inside it there is a folder named as B folder and then inside it there are the files.
Is it possible to make less folders , i mean can only a single folder be made inside which the files should be there ?