Create folder and move files to specific directory in AL11

My requirement is to create a new folder in one of the existing directories in AL11 and move some files into it.
I searched the forum and found this solution but it creates folder only in DIR_HOME directory.
data: unixcom like rlgrap-filename.
data: begin of tabl occurs 500,
line(400),
end of tabl.
unixcom = 'mkdir mydir'. "command to create dir
"to execute the unix command
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
I want the folder to be created in some other directory DIR_INTERFACES .
Any suggestions are welcome ..

Get complete path (physical path) using FM FILE_GET_NAME_USING_PATH.
Default directory is DIR_HOME, hence it creates file in that directory...If you specify complete folder name, it will be created under that path..
Concatenate mkdir
space
<physical path>
mydir
into unixcom.

Similar Messages

  • Batch create folder and move files

    Hi,
    I have files such as:
    FD3_xxx1
    FD3_xx2
    Fd3_xxx3
    FD63_xxx1
    FD63_xx2
    Fd63_xxx3
    How would I create a batch file that would create folders with the characters before the "underscore" and then add the files into them. For example, all "FD3" files will go in a folder called "FD3" and all "FD63" files will go into a folder called "FD63".

    Dear Frederik and/or Bill,
    I have come across this question and your answer and it seems that this is a solution to may problem as well. However, you say that a user needs "to activate it to do something useful". I have no experience in programming and I do not know how to activate
    it. Please let me what to do to make this work.
    One needs to be careful when running batch files that move or delete large numbers of files in one fell swoop. This is why I posted the file in a passive form. To be on the safe side you must do this:
    Open a Console session with cmd.exe.
    Invoke the batch file in its current (=passive) form.
    Carefully examine the screen output it generates.
    If the output fully agrees with your expectations, activate the batch file by modifying this line
    echo move %1 %Folder%
    to read like so:
    move %1 %Folder%
    Why? Because the batch file command "echo" will write things to the screen but do nothing else. Hence the command
    echo Hell World!
    will put the phrase "Hello World!" on the console screen. Once you remove the word "echo", you will actually execute the "move" command:
    move %1 %Folder%
    A general observation: I feel somewhat uneasy about you running a batch file that includes advanced commands, apparently without you really knowing what it is doing and how it is doing it. Performing the task manually might be a safer option.

  • Creating Folder and Accessing Files from Folders in mobile phone

    Hello Friends,
    I am doing my project where I need to create folders and accessing files from those folders in java enabled mobile phones.But I do not know the required tasks for this.Any type of help is highly appreciated.
    Greeting
    Saadi

    You have to get the classname of the Items you receive from getitems.
    There you have only to look for Folder.CLASS_NAME. Example:
    ifsFol sorted by names in ascending order (names of folders and files)
    String[] sort_attributes = {"NAME"};
    //sort will be ascending
    boolean [] sort_orders = {true};
    oracle.ifs.common.SortSpecification sort = new oracle.ifs.common.SortSpecification(sort_attributes, sort_orders);
    ifsFol.setSortSpecification(sort);
    PublicObject[] contents = ifsFol.getItems();
    System.out.println("Here are the names of the items in folder: ");
    for (int i=0; i < contents.length; i++) {
    if (contents.getClassname().equals(Folder.CLASS_NAME)) {
    System.out.println(contents[i].getName());
    null

  • [SOLVED] Automatically rename folder, create subfolder and move files

    Hey all :>
    my music directory is a bit messed up and untidy. all albums were encoded into one single folder:
    $artist - $album ($year)
    Aerosmith - Toys in the Attic (1975)
    how can i create a parent folder with the name of the artist (here: Aerosmith), a subfolder for the album without the year (Toys in the Attic) and move all mp3's into it? i have no idea how to handle filenames with bash
    thx for every comment! :>
    Last edited by arch0r (2010-11-28 16:58:01)

    eh, figured I'd make it a little more elegant and add some directory checks. this should work for all cases theoretically so that if you add music later on you can update your directories
    preconditions: newly added directories are in the format that was prescribed by you and the output doesn't contain any dashes. (I based my glob off of the presence of a dash.)
    #!/usr/bin/perl
    use strict;
    use warnings;
    use File::Copy;
    chdir "music" or die "cuidado! $!";
    my @directories = glob "*-*";
    my @artists;
    my %albumhash;
    foreach(@directories)
    push(@artists,split(/ - /,$_));
    while(@artists)
    my $key = shift(@artists);
    my $value = shift(@artists);
    push(@{$albumhash{$key}}, $value);
    foreach(keys %albumhash)
    if(!(-d $_))
    mkdir $_,0755 or die "couln't makedir\n";
    chdir $_;
    foreach(@{$albumhash{$_}})
    my $dirname = substr($_,0,(length($_) - 7));
    if(!(-d $dirname))
    mkdir $dirname,0755 or die "couldn't make subdir\n";
    chdir "..";
    foreach(@directories)
    my $current = $_;
    my $targetdir = substr($_,0,(index($_,'-') - 1)) . "/" . substr($_,(index($_,'-')+2),(index($_,'(') - index($_,'-') - 3));
    chdir $current;
    my @musicfiles = glob("*");
    chdir "..";
    foreach(@musicfiles)
    my $old = "$current/$_";
    my $new = "$targetdir/$_";
    move($old,$new) or die "Danger Will Robinson! $!";
    rmdir($current);
    Thanks for the fun distraction, normally I don't like being someone's personal army but you caught me during my vacation   you should be receiving my bill via e-mail (just kidding):D
    Last edited by Cyrusm (2010-11-28 16:01:53)

  • Create folder (rename), move files and delete source

    This seems a simple and obvious need but I cant find anything to help.
    I want to be able to create a folder with a unique name (I would prefer to input the folder name when the workflow is run), move some files into it, and ensure the source files in the original location are deleted.
    The problem with the create new folder action as it stands is that it COPIES any files passed into it. I want to MOVE the files into a new folder.
    Am I missing something obvious?

    There's no out of the box way to achieve what you're looking for.
    Two solutions:
    1. Your users would need to open the entry first and then click on the "edit this file" link.
    2. You could code your own folder view or landing page element and build what you need.
    HTH
    Cheers
    Erik
    PS: Feel free to contact me offlist if you need professional support.

  • Create folder and copy files problem

    Hello all indesign script Members
    where I work we use a permanent folder structure for an example
    a jobnumber called "123123"
    I have wrote a little interface called interface.jsx, this file is saved and located in
    123123/scripts/interface
    I want my interface to navigate two folders up
    to 123123/source/ creates  a folder called "hej" so result is "123123/source/hej"
    then I can pick from a little dialog box the folder 123123/source/a/ copy all .indd files to the folder hej (or any other folder I choose from the dialog box)
    I want the script to know the active path instead of whole locations because, we have different project numbers all the time.
    then run an extern script called hej.jsx
    the best should be also if the script could chose 123123 as default jobnumber too.
    Please could  someone help me to script this?
    /get started I am very newbie
    Thank you so much in advance
    All Adobe Members

    Hi tjacobs01,
    Thanks for reply. I didnt include main method since i dont want to make the problem looks too complicated. I called both of the methods in main. The following is the simplified class code including main method.
    import java.io.File;
    import java.io.IOException;
    public class TestClass{
    public void buildFolder(){
    File f=new File("/documents/hospital_backup");
    if(f.exists()==false){
    f.mkdirs();
    public void copyFile(String file){
    String form_cmd="cp /job_holding/hospital/" + file + " /documents/hospital_backup/"+file;
    String[] command = new String[]{"sh", "-c", form_cmd};
    try{
    Runtime r=Runtime.getRuntime();
    Process p =r.exec(command);
    BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line = null;
    while ((line = in.readLine()) != null) {
    System.out.println(line);}
    int exitVal=p.waitFor();
    System.out.println("Process exitValue:"+exitVal);
    }catch(Exception e){System.out.println(e);}
    public static void main(String[] args) {
    String dir_root="/job_holding/hospital/";
    File f=new File(dir_root);
    File[] fList = f.listFiles();
    for (int i=0; i<fList.length; i++)
    String file=dir_root+fList.getName();
    TestClass test = new TestClass();     
    test.buildFolder();
    test.CopyFile(file);

  • Ssis - move files from one directory to another and rename destination file if present

    Hello,
    How is it possible to move files from one directory to another directory and if the file already exists in destination directory then rename it?
    Thanks

    1. Use a foreach loop with file enumerator pointing to first directory.
    Inside loop have a ssis variable of type string to get filename (@[User::FileName])
    Choose option as Fully Qualified in loop
    2. Add another variable called @[User::DestFileName], set EvaluateAsExpression true for it and set expression like this
    REPLACE(@[User::FileName],<source directory path>,<destination directory path>)
    put actual paths in above expression in your case
    and another variable called @[User::RenameFileName], set EvaluateAsExpression true for it and set expression like this
    REPLACE(@[User::FileName],".","_old.")
    3. Create a boolean variable say @[User::FileEXists]
    4. Add a Script Task inside the loop and pass @DestFileName variable in ReadOnly mode and FileExists in ReadWrite mode
    Inside Script Task write code as per below
    http://blog.dbandbi.com/2013/11/13/check-file-exists-ssis/
    5. Add File System Task choose operation as Rename File, Select IsSourcePathVariable as true and select @[user::DestFileName] variable and IsDestinationPath variable as true and select @[user::RenameFileName] variable
    6. Choose ExpressionAndConstraint option for precedeence constraint from ScriptTask to above File System Task and choose constraint as OnSuccess and expression as
    @FileExists == True
    7. Add another File System task with operation as Move File Select IsSourcePathVariable as true and select @[user::FileName] variable and IsDestinationPath variable as true and select @[user::DestFileName] variable. Join Script Task as well as
    File System Task above to this task and choose constraint as OnSuccess and Multiple Constraint option as Or (dotted line)
    Then once executed it will work as per your requirement
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Unix command to create a copy of file from unix directory

    Hi guys,
    what is the Unix command to create a copy of file from unix directory?
    Thanks a lot!

    If you haven't noticed, this is a ABAP forum.
    You can go to the UNIX thread instead and post it there,
    SAP on UNIX
    You can expect answers there

  • Using Automator and Applescript to search and move files to flash drive

    I've used applescript and automator to do simple tasks like watch folders and move files and rename files, but that is about the extent. I am wondering if it is possible to set up a automator service or app that will do several things.
    When a flash drive is plugged it, it will ask for a file to be searched for, then it will search a predetermined directory for files with the word or number in them and then it will copy the found files to the mounted flash drive.
    Any help would be greatly appriciated!
    Thanks!

    As a start, you can use launchd to run a script when a volume is mounted:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Label</key>
              <string>com.tonyt.LaunchOnVolMount</string>
              <key>ProgramArguments</key>
              <array>
                        <string>LaunchOnVolMount.sh</string>
              </array>
              <key>QueueDirectories</key>
              <array/>
              <key>StartOnMount</key>
              <true/>
              <key>WatchPaths</key>
              <array/>
    </dict>
    </plist>
    You can then have the LaunchOnVolMount.sh script perform the tasks you need.
    You can incorporate Applescript within the Bash script with osascript:
    #!/bin/bash
    answer=$( osascript -e 'tell app "System Events" to display dialog "What file do you want to search for?" default answer "" ' )
    echo $answer
    I beleive that you can also call an Applescript from launchd

  • WPA8.1 Feature to save and move files between folders and OneDrive Folders

    Hi,
    I would like to suggest to dev team a new feature to Adobe Reader on Windows Phone.
    Today I was done a uggly workarround to save one PDF file on a OneDrive folder to send to my classmates. So I would like a feature to save and move files between folders on SD cards and OneDrive to keep my phone organized.
    thank you for your time.

    Here:
    property aFolder : "a"
    property bFolder : "b"
    property cFolder : "c"
    property dFolder : "d"
    property eFolder : "e"
    tell application "Finder"
    try
    set theLocation to the selection as alias
    on error
    set theLocation to (folder of the front window as alias)
    end try
    if not (exists folder aFolder of theLocation) then make new folder at theLocation with properties {name:aFolder}
    if not (exists folder bFolder of theLocation) then make new folder at theLocation with properties {name:bFolder}
    if not (exists folder cFolder of theLocation) then make new folder at theLocation with properties {name:cFolder}
    if not (exists folder dFolder of theLocation) then make new folder at theLocation with properties {name:dFolder} 
    if not (exists folder eFolder of theLocation) then make new folder at theLocation with properties {name:eFolder}
    set this_list to every file of theLocation
    repeat with i in this_list
    if (name of i) begins with "a" then
    move i to folder "a" of theLocation
    else if (name of i) begins with "b" then
    move i to folder "b" of theLocation
    else if (name of i) begins with "c" then
    move i to folder "c" of theLocation
    else if (name of i) begins with "d" then
    move i to folder "d" of theLocation
    else if (name of i) begins with "e" then
    move i to folder "e" of theLocation
    end if
    set name of (the result) to items 3 thru -1 of (get name of (the result)) as string
    end repeat
    end tell
    (98558)

  • I want to transfer my photo and movie files from my iPhone 4S to my mac.

    I have posted this question before without any success and was hoping by reposting it may promt a solution to my problem.
    I want to transfer my photo and movie files from my iPhone to my Mac OS X (10.5.8).
    But I don't want to use Cloud or iTunes.
    Is there a way to connect my iPhone 4S to my Mac directly,
    say ... via a program or such on my MAC, to drag and drop the photos and Movie files,
    directly into a folder. ??????????
    Reason want to connect iPone to MAC or MAC to iPhone is ....
    I have no DATA on my iPhone Mobile plan at moment.
    So Photosync app is no good, as I can't download the app to my iPhone.
    I can download a Photosync to my MAC ...
    but with the Photosync app you can only send data.
    Thanks in advance for any help.

    Sorry I should of mentioned ....
    Reason want to connect iPone to MAC or MAC to iPhone is ....
    I have no DATA on my iPhone plan at moment.
    So Photosync app is no good, as I can't download the app to my iPhone.
    I can download a Photosync to my MAC ...
    but with the Photosync app you can only send data  (so needs to be on the  iPhone).

  • My 5 year old MacBook Air is telling me it "cannot save information about your mailboxes because there isn't enough space in your home folder.  Quit mail, delete files you don't need, then reopen mail."  What is "home folder," and which files to delete?

    My 5 year old MacBook Air is telling me it "cannot save information about your mailboxes because there isn't enough space in your home folder.  Quit mail, delete files you don't need, then reopen mail."  What is "home folder," and which files to delete? Thanks.

    The home folder is where all of your personal files are kept.
    Best candidates to delete are movies, videos, music and photos since they generally take the most space.
    Don't forget to empry the Trash after you delete the file because the space is not returned until the Trash is emptied.
    Allan

  • How to create parameter and control file like filename + date

    Hello there
    I am trying to create parameter and control file with following command
    in SQLPLUS
    create pfile='/u03/oradata/WEBDB/backup/initWEBDB.ora' from spfile;
    In RMAN
    copy current controlfile to '/u03/oradata/WEBDB/backup/cf_longterm.cpy';
    how can I put date at the end of filename like
    initWEBDB8jan06.ora and cf_longterm8jan06.cpy
    Thanks in advance
    Lionel

    ASM is reliable but a smart DBA is very careful. If ASM is doing mirroring this is like RAID doing mirroring. What happens if you accidentally delete one copy ... the other one disappears instantly. Not a good idea.
    With respect to redo logs you need a minimum of three groups, two members, and one thread per instance. So a 2 node cluster should, at a minimum have 12 physical files.
    Not mirroring the redo logs, assuming multiple members, is not as critical.

  • .mp4 and .mov files are just LARGE

    Sorry, without posting all the encoding details, is there an obvious reason why my .mp4 and .mov files are ~10x the size that they should be after AME? I'm talking about files that are 30mb .mp4's before and 300mb.mov afterwards. If you need details I'll post. Thanks.

    File size is determined primarily by only two factors - duration and bitrate.  The codec used, resolution, frame rate, etc. all have little or no effect on file size.
    Duration, and bitrate.  If you want a smaller file, one or the other of those has to be reduced.

  • Export current format - JPG and MOV files

    When exporting jpg and mov files in "current format" the mov files will be exported with only 1 second (ca 130kb).
    If I export in "original format" it exports the mov files as they are, but the pictures are "original" and not show the last version.
    Any idea?

    If you dleted them you'll need to use a file recovery application like File Salvage
    Regards
    TD

Maybe you are looking for

  • What are the proper settings to encode for the iPad using compressor?

    I'd like to use 1080p the specs say it is capable of. I can get it working using hand brake but I don't see why I can't do it with compressor.

  • I-Tunes cannot open anymore in my latop

    I installed I-Tunes in my business laptop and after putting all my music and creating playlists, now I cannot open I-Tunes to synchornise with my I-POD. What happens when I press the I-Tunes icon is that after 2 or 3 seconds a kind of DOS window appe

  • Mail prefs for Adobe Reader

    Created a pdf document in Adobe reader and want to send it as and attachment in Adobe reader. It wants to use the default "mail" account. I want to use my Gmail acccount. How can I change this preference so it sees my Gmail account?. Thanks

  • How to stop monitor from going black after no activity for a short time while reading a document?

    When I'm reading an e-mail or document without moving my mouse, the screen turns black after only about one minute and then switches to my screen saver.  I must move the mouse constantly to keep my active window open.  I can't find out how to turn th

  • Mass Re-start / Re-schedule of Maintenance Plan

    Dear Sirs, I have created a BDC which runs in the background at the end of every month. This BDC creates a Strategy Maintenance Plan (IP42), the moment a new equipment is installed in the system & it automatically gets scheduled (IP10) as per the ins